Why is my table array not outputting?!
Mostrar comentarios más antiguos
Hello,
Below is a copy of my code. I can not figure out why the code will not output my table, if you can help it will be most appreciated.
-Robert
CODE:
wn = 5;
za = (5/sqrt(2))/(2*wn);
zb = 5/(2*wn);
zc = (5*sqrt(2))/(2*wn);
zd = (5*sqrt(3))/(2*wn);
ze = 12/(2*wn);
% Peak Times
Tp = [pi/(wn*sqrt(1-za^2)),
pi/(wn*sqrt(1-zb^2)),
pi/(wn*sqrt(1-zc^2)),
pi/(wn*sqrt(1-zd^2)),
pi/(wn*sqrt(1-ze^2))]
% Settling Time
Ts = [4/(za*wn),
4/(zb*wn),
4/(zc*wn),
4/(zd*wn),
4/(ze*wn)]
OptimalSystems = {'System A';'System B','System C','System D','System E'};
Gain = [5/sqrt(2) 5 5*sqrt(2) 5*sqrt(3) 12];
PeakTime = [Tp(1) Tp(2) Tp(3) Tp(4) Tp(5)];
SettlingTime = [Ts(1) Ts(2) Ts(3) Ts(4) Ts(5)];
T = table(OptimalSystems,Gain,PeakTime,SettlingTime)
Respuesta aceptada
Más respuestas (1)
KSSV
el 27 de Sept. de 2018
There were some typo errors and dimension problems.....corrected.
wn = 5;
za = (5/sqrt(2))/(2*wn);
zb = 5/(2*wn);
zc = (5*sqrt(2))/(2*wn);
zd = (5*sqrt(3))/(2*wn);
ze = 12/(2*wn);
% Peak Times
Tp = [pi/(wn*sqrt(1-za^2)),
pi/(wn*sqrt(1-zb^2)),
pi/(wn*sqrt(1-zc^2)),
pi/(wn*sqrt(1-zd^2)),
pi/(wn*sqrt(1-ze^2))]
% Settling Time
Ts = [4/(za*wn),
4/(zb*wn),
4/(zc*wn),
4/(zd*wn),
4/(ze*wn)]
OptimalSystems = {'System A';'System B';'System C';'System D';'System E'};
Gain = [5/sqrt(2) 5 5*sqrt(2) 5*sqrt(3) 12]';
PeakTime = [Tp(1) Tp(2) Tp(3) Tp(4) Tp(5)]';
SettlingTime = [Ts(1) Ts(2) Ts(3) Ts(4) Ts(5)]';
T = table(OptimalSystems,Gain,PeakTime,SettlingTime)
Categorías
Más información sobre Tables 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!