1
下面是将从结构中提取出ID名称的单元阵列的一些代码。它使用for循环来实现这一点。不过,我想知道是否有一种方法可以在不使用forloop的情况下执行相同的任务?多结构输出到列表
tft(1).Id = 'Name1';
tft(1).Desc = 'goes by the name';
tft(2).Id = 'Name2';
tft(2).Desc = 'hates the name';
for a=1:length(tft)
list{a} = tft(a).Id
end
感谢您的信息。现在我知道这叫做什么了。 –