Change data in Matlab table
Mostrar comentarios más antiguos
The next code is generating the table:
%Program start:
ek1=0;
ek2=0;
ek3=0;
uk1=0;
uk2=0;
uk3=0;
yk1=0;
yk2=0;
wk=1;
for k=0:36
yk=0.19897725*uk1+0.15764221*uk2+1.42526141*yk1-0.496585302*yk2; vy(k+1)=yk;
ek=wk-yk;
ve(k+1)=ek
uk=3.633713*ek-.1511479*ek1+4.6158145*ek2-0.979647*ek3+0.8868*uk1+0.651103*uk2-0.537903*uk3;
vu(k+1)=uk;
uk3=uk2;uk2=uk1;uk1=uk;
yk2=yk1;yk1=yk;
ek3=ek2;ek2=ek1;ek1=ek;
end
plot(vy,'-g')
hold on
plot(ve,'-r')
hold on
plot(vu,'-b')
grid
%Generating the table in Matlab:
f = figure('Position',[200 150 300 150]);
k=0:1:36;
k';
vy';
ve';
vu';
dat=[k' vy' ve' vu'];
cname={'K','YK','EK','UK'};
rname={'0','1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36'};
t=uitable('Parent',f,'Data',dat,'ColumnName',cname,'RowName',rname,'Position',[10 1 700 686]);
%End of program
Is there any method to appear 0 on EK column of the table, instead of ...e-04(05 06 and 07)?
Many thanks!
2 comentarios
Image Analyst
el 19 de En. de 2013
Editada: Image Analyst
el 19 de En. de 2013
Edit - I fixed the mangled, un-runnable formatting. Simply copying and pasting your code did not work.
ionut
el 19 de En. de 2013
Respuesta aceptada
Más respuestas (0)
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!