Printing table using fprintf
显示 更早的评论
I have the following code; my problem is that in for loop i want to give different names Ti(for i=3 )to tables . For this i try to use fprintf but it doesn't work. Any ideas?
clc
clear
job={'J1';'J2';'J3';'J4'};
A=[4;10;7;9];
B=[8;13;6;11];
Sum=A+B;
u1=table(job,A,B,Sum)
u2=sortrows(u1,4,'descend');
t=removevars(u2,{'Sum'})
t1=t(1,:)
for i=1:3
Ti=[t(i+1,:);t1]
end
with this code, i got all 3 tables with name Ti.
采纳的回答
更多回答(1 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!