MATLAB: How to make successive for loops?! equationfindfor loopif conditionsloopsMATLAB Hey everybody; i want to make 3 successive loops that the next loop start from the end of the previous ….can any one help me through that?! code is attached Best Answer If you compare with my code, you'll notice that the use of i2 and i3 in these lines is not correct. v2(i2)=70.*w1; u2(i2)=70.*w12; x2(i2)= y1(i+1); y2(i2)=y1(i+1); v2(i3)=30.*w2; u2(i3)=30.*w22; x2(i3)=y1(i2+1); y2(i3)=y1(i2+1);Furthermore, I never introduced v2,u2,x2,y2.Best wishesTorsten. Related SolutionsMATLAB: Need help in this When saving aw1 in a.m you need to save all other symbolic variables toosave('filename.mat', 'aw1', 'w1', 'w2', 'w3', 'w4', 'v1', 'v2', 'x1', 'x2', 'yd' );and then load the file in b.m load('filename.mat');Alternatively, you can also try to just save aw1save('filename.mat', 'aw1')and then in b.m writeload('filename.mat');syms w1 w2 w3 w4 v1 v2 x1 x2 ydFor a bit detailed discussion on this topic, refer to Walter's answer and my comments here: https://www.mathworks.com/matlabcentral/answers/513625-how-to-save-a-symbolic-equation-in-a-txt-file#answer_422592 MATLAB: Running for loops in parallel parfor k = 1:3 if k == 1 for n = 1:numel(variant1) [y1_v1,y2_v1]=calcscoreV1(x1_v1,x2_v1) end elseif k == 2 for n = 1:numel(variant2) [y1_v2,y2_v2]=calcscoreV2(x1_v2,x2_v2) end else % k == 3 and default: for n = 1:numel(variant3) [y1_v3,y2_v3]=calcscoreV3(x1_v3,x2_v3) end endendOf course the outputs y1_v1 etc. must be store in a meaningful way. Related QuestionAcos failsRunge Kutta method for coupled oscillator system.How can i call array elements in a plot3 functionError: Index exceeds the number of array elements(1)2nd order numerical differential equation system solving
Best Answer