Hi, I am having trouble with the second for loop in this function. I keep getting the error "Unable to perform assignment because the left and right sides have a different number of elements". It works for the first couple iterations but stops after that.
for i=1:50 theta(i) = 90 - beta(i); end a = theta(theta>15); Po = 200; for j = 1:length(a) %% this for loop not working
beta_new(j) = 90-a(j); Pout(j) = Po*cosd(beta_new(j)); index(j) = find(beta_new(j) == beta); end
Best Answer