How can i correct the below Matlab code
Show older comments
for p=1:5
S0=[0.1 0.2 0.3 0.4 0.5];
D0=[2.1 2.2 2.3 2.4 2.5];
for rep1=length(S0(p))
for rep2=length(D0(p));
Sr=S0(rep1);
Du=D0(rep2);
end
end
I need to evaluate the below condition. How can i change the above code.
S0 1st value & D0 1st value;
S0 2nd value & D0 2nd value;
S0 3rd value & D0 3rd value;
S0 4th value & D0 4th value;
S0 5th value & D0 5th value.
Accepted Answer
More Answers (0)
Categories
Find more on Startup and Shutdown 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!