Index exceeds the number of array elements (11).
Show older comments
This is my script.
L_S = [37.752: L_delta_S : 83.483]';
W_S = [12.995 : W_delta_S : 23.6205]';
for S1 = 1:length(L_Possible_States)
for S2 = 1:length(W_Possible_States)
% First part
m = S2 + (11*S1 - 11);
L_Possible_States(m,1) = L_S(S1);
% Second part
W_Possible_States(m,1) = W_S(S2);
W_H(m,1) = -0.7469179561*W_Possible_States(m,1) + 0.0021132084*W_Possible_States(m,1)^2 + 15.62636759*W_Possible_States(m,1)^0.5 + 573.017896;
Wdischarge(m,1) = 18775;
Wpower(m,1) = WP(1,1)* W_H(m,1) + WP(1,2);
end
end
Index exceeds the number of array elements (11).
Error in Mywork (line 203)
W_Possible_States(m,1) = W_S(S2);
I have searched similar problems but still cannot handle this. Is anyone can help me? Thanks!
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!