Hello,
I want to iteratively plot the results of my while loop, however, I end up with a blank graph or an error.
Here is the code:
Vlow=350;fs=100000;n=0.56;Lk=41.98*0.000001;P=10000;Vhigh=900;C=0;i=0;s=poly(0,"s");while Vlow < 450 Polynome=((P*Lk*n*fs)/(Vhigh*Vlow))-s+s^2; solution=roots(Polynome); out = solution(solution<0.35 & solution>0.129); I1=(1/(2*Lk*fs))*(2*(Vlow/n)*out+Vhigh-(Vlow/n)); I2=(1/(2*Lk*fs))*(2*Vhigh*out-Vhigh+(Vlow/n)); if I1 > I2 then C= I1; else C=I2; end Y(i)=C; X(i)=Vlow+20; i=i+1;endplot(X,Y);
Any help would be greatly appreciated,
Thank you
Best Answer