i recieve this error while i was trying to calculate mean percentage of (y) corresponding to binned x:
Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 2-by-1.
Error in dose_meanvs_distance (line 12) Mean_perc (counter,1) = (Mean_dose_interval/size(interval,1))*100;
this is part of my code:
counter = 1
for m= (min(x)):0.5 : (max(x)) interval = x > m & x < m+0.5;% after running the loop it keeps the run results
distance(counter,1) = mean(x(interval)); Mean_dose_interval(counter,1) = mean(y(interval)); Mean_perc (counter,1) = (Mean_dose_interval/size(interval,1))*100; err (counter,1) = std(y(interval)); counter=counter+1;end
Best Answer