Unable to perform assignment because the size of the left side is 1-by-1
and the size of the right side is 257-by-1.
Error in power_and_scatter_plots (line 45)
allspectrums_ventricle_young(a,:) = power_ventricle_young;
You've apparently already defined allspectrums_ventricle_young from a previous run and haven't cleared it. Now you're trying to put a 257-long column array into a row of the existing array.
Add a
clear allspectrums_ventricle_young
before beginning the loop. But, unless there are exactly the same number of elements for each pass, you'll have a problem of mismatched sizes when that does occur (if it does).
I'd write
allspectrums_ventricle_young(a,:)=power_ventricle_young.';
to match up the orientations.
Best Answer