How could I insert values from a vector into a GUI table like individual rows?

1 次查看(过去 30 天)
I have the next code in my .m file:
v=0:1:primeunid;
pc=mod(v.^2,primeunid);
dnfinal=pc*dfinal;
set(handles.vprintout,'String',pc);
set(handles.SnFinalOut,'String',dnfinal);
data1=num2str(pc);
data2=num2str(dnfinal);
datos=get(handles.QRDUTABLE,'Data');
if isempty(datos)
datos{1,1}=data1;
datos{1,2}=data2;
else
datos{end+1,1}=data1;
datos{end,2}=data2;
end
set(handles.QRDUTABLE,'Data',datos);
end
Yeah, in fact... my code it really works and you can print values but I want that pc and dnfinal add a new value in rows. If a run the code, It makes the proccess but print all the values into a single GUI Table cell, like in the next picture:

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by