【发布时间】:2014-10-06 14:34:24
【问题描述】:
假设我们有一个函数,它有一些输出,包括一些数字和矩阵
[A,a,B,n,m] = func(file)
file 作为输入每次都不同,func 将在循环for 中读取它。
矩阵B 始终有两列,其中的行取决于输入文件和func 内部的计算。
现在我想每次在输出中保存这些矩阵B。迭代次数是固定的,比如 10 次。
for 循环是这样的
for i=1:10
..... %// here reads the name of the input file which differs each iteration
[A,a,B,n,m] = func(file)
.....
end
有什么建议吗?
【问题讨论】: