Uitable and vpa
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi, I have problem with my code: vpa works for "result", but I need show result in the uitable1, but for "res" command vpa doesn't work.
matrix=[A B;C D]
a=simple(matrix\X);
b=sym(a)
result=vpa(b,4)
f=size(result);
for i=1:f(1);
for j=1:f(2);
res(i,j)=cellstr(char(result(i,j)));
end
end
set(handles.uitable1,'Data',res);
Please help
0 Kommentare
Akzeptierte Antwort
Sean de Wolski
am 6 Mär. 2012
Instead of char(result), use num2str() or sprintf()
doc num2str
doc sprintf
and for the comparison,
doc char
4 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Scope Variables and Generate Names finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!