ERROR: array indices must be positive integers or logical values
Mostra commenti meno recenti
The program does not graph the temr function, only recognize tem function and always shows the same error in temr line(Array indices must be positive integers or logical values)
U=220;f=50;p=3;R1=4;R2=4;X1=6;X2=6;m=3;
n1=60*f/p;
s=0.001:0.001:1;
n=(1-s)*n1;
R2r=R2+46;
Tem=@(s)((m*p*U^2*R2./s)./(2*pi*f*((R1+R2./s).^2+(X1+X2)^2)));
Temr=@(s,R2r)((m*p*U^2*R2r./s)./(2*pi*f((R1+R2r./s).^2+(X1+X2)^2)));
plot(Tem(s),n,'r');
xlabel('Tem/n*m');
ylabel('n/r/min');
hold on;
plot(Temr(s,R2r),n,'b');
legend('After Regulation','Before Regulation');
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Vehicle Dynamics Blockset in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!