How to modify this script
Mostrar comentarios más antiguos
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 comentarios
FG
el 9 de Sept. de 2020
Walter Roberson
el 9 de Sept. de 2020
Which variable corresponds to Power factor? I do not seem to find any 0.95 or anything reasonably close in your computations.
PL appears to be variable PL
FG apppears to be variable FG
Angle is ambiguous as to whether it is ANG_A, ANG_B, or ANG_C. All three are set to the same value in the code, so it is not obvious why you have three separate variables, and the differences between them might be important later, perhaps.
Nt appears to be variable Nt
FG
el 9 de Sept. de 2020
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!