Skip to content
Snippets Groups Projects
Commit cc4ba4bb authored by Nicola Vigano's avatar Nicola Vigano
Browse files

Signals can be in cell arrays

parent cf00d171
No related branches found
No related tags found
No related merge requests found
function e = gtGetSignalEnergy(s) function e = gtGetSignalEnergy(s)
e = sum(sum(abs(s))); if (iscell(s))
e = sum(e(:)) / numel(s); e = sum(cellfun(@gtGetSignalEnergy, s));
else
e = sum(sum(abs(s)));
e = sum(e(:)) / numel(s);
end
end end
\ No newline at end of file
function p = gtGetSignalPower(s) function p = gtGetSignalPower(s)
p = gtImgMeanValue(s .* s); if (iscell(s))
p = sum(cellfun(@gtGetSignalPower, s));
else
p = gtImgMeanValue(s .* s);
end
end end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment