I have an M file as shown in the figure. What I want to do is; Instead of naming the cases like: 1111, 1112,1113...3452, 3453, 3454 I want to name them according to the states they are in like:
Case 1111 should be; Power Factor=0.95, PL=14500, FG=500, Angle=0, Nt=1
Case 1112 should be; Power Factor=0.95, PL=14500, FG=500, Angle=0, Nt=2
.
.
.
Would be pleased if you could help me about it.. Thnx
-----------------------------------------------------------------------------------
Q=[atan(18.19) atan(25.84) atan(31.78)];
P=[14500 10000 5000 500];
Ang=[0 10 20 30 40];
NT=[1 2 5 10];
for m=1:length(Q)
QM=Q(m)
for i=1:length(P)
PL=P(i);QL=QM*PL;FG=15000-P(i);
for k=1:length(Ang)
Ang_A=Ang(k);
Ang_B=Ang(k);
Ang_C=Ang(k);
for l=1:length(NT)
Nt=NT(l);
sim('islanding_UW_New_Loads_Fasilali_oran_SonTHD_Deneme')
t=harm_ratio.time;
HV3=harm_ratio.signals(1).values;
HV5=harm_ratio.signals(2).values;
HV7=harm_ratio.signals(3).values;
thd=THD.signals(1).values;
c=sprintf('Case%d%d%d%d',[m,i,k,l])
save(c)
end
end
end
end
3 Comments
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/590770-how-to-modify-this-script#comment_1002109
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/590770-how-to-modify-this-script#comment_1002109
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/590770-how-to-modify-this-script#comment_1002130
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/590770-how-to-modify-this-script#comment_1002130
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/590770-how-to-modify-this-script#comment_1002154
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/590770-how-to-modify-this-script#comment_1002154
Sign in to comment.