Using your Wolfram in question...
BODE(.01,100, [1],[1 1])
.1 and 100 are the frequency range you want to analyze.
all plots/bode() executions shd be entered from
Home screen.
Use VIEW>> {Start/Info, Magnitude, Phase, Nyquist, Nichols}
HOME SCREEN
VIEW>>Start/Info (refreshes Statistics_2Var_Copy parameters...hit any Key to get You to Home Screen again)
Use VIEW>> {Start/Info, Magnitude, Phase, Nyquist, Nichols} again for the same BODE().
use soft Menu zoom (auto-scale)to zone in on plots. (just because i can't graphs to center on the screen) help needed on that!!!
This App is based on
Statistics_2Var_Copy.
You need to recompile before your first use of this App.
Code:
Tf();
BODE();
Xmi,Xma;
VIEW "Start/Info",START()
BEGIN
C1:={};
C2:={};
S1:={'C1','C2','1','13'};
STARTVIEW(6,1);
WAIT();
STARTVIEW(-1,1);
END;
export BODE(Xmi,Xma,num,den)
BEGIN
local num:=poly2symb(num,"*x");
local den:=poly2symb(den,"*x");
expand(num/den)▶F1;
makelist(X,X,1,1000,1)▶L9;
L1:=ALOG(LOG(Xmi)+(L9-1)*(LOG(Xma)-LOG(Xmi))/1000);
Statistics_2Var_Copy.Xmin:=(Xmi);
Statistics_2Var_Copy.Xmax:=(Xma);
F2:=20*LOG(CAS.ABS(F1));
L2:=Tf(L1);
L7:=20*LOG(ABS(L2));
L3:=ARG(L2)*180/pi;
L4:=IM(L2);
L5:=RE(L2);
END;
EXPORT Tf(x)
BEGIN
L2:=(F1(X)|x=L1);
END;
VIEW "Magnitude",Magnitude()
BEGIN
S1:={'C1','C2','1','13'};
C1:=LOG(L1);
C2:=L7;
Statistics_2Var_Copy.Xmin:=Statistics_2Var_Copy.Xmin;
Statistics_2Var_Copy.Xmax:=Statistics_2Var_Copy.Xmax;
Xtick:=1;
Statistics_2Var_Copy.Ymin:= FLOOR(MIN(C2)+1);
Statistics_2Var_Copy.Ymax:= CEILING(MAX(C2)+1);
Ytick:=10;
END;
VIEW "Phase",Phase()
BEGIN
C1:=LOG(L1);
C2:=L3;
Statistics_2Var_Copy.Xmin:=Statistics_2Var_Copy.Xmin;
Statistics_2Var_Copy.Xmax:=Statistics_2Var_Copy.Xmax;
Xtick:=1;
Statistics_2Var_Copy.Ymin:= FLOOR(MIN(C2)+1);
Statistics_2Var_Copy.Ymax:= CEILING(MAX(C2)+1);
Ytick:=5
END;
VIEW "Nyquist",nyquist()
BEGIN
C1:=L5;
L4▶C2;
Statistics_2Var_Copy.Xmin:= FLOOR(MIN(C1)+1);
Statistics_2Var_Copy.Xmax:= CEILING(MAX(C1)+1);
Xtick:=.2;
Statistics_2Var_Copy.Ymin:= FLOOR(MIN(C2)+1);
Statistics_2Var_Copy.Ymax:= CEILING(MAX(C2)+1);
Ytick:=0.2;
END;
VIEW "Nichols",Nichols()
BEGIN
C1:=L3;
C2:=L7;
Statistics_2Var_Copy.Xmin:= FLOOR(MIN(C1)+1);
Statistics_2Var_Copy.Xmax:= CEILING(MAX(C1)+1);
Statistics_2Var_Copy.Ymin:= FLOOR(MIN(C2)+1);
Statistics_2Var_Copy.Ymax:= CEILING(MAX(C2)+1);
Ytick:=10;
END;
PLOT()
BEGIN
STARTVIEW(1,1);
END;
enjoy....!! thanks