to store output values function after solved it.

3 次查看(过去 30 天)
I have a problem to solve in this part of the my code This is the situation: I have data in cell format and I want to use it in these functions bellow:
where Seg is a number.
for i=1:Seg
[sp,imp]=pure2(Xn{i,1}',npc(i,1),1);
[copt,sopt,sdopt,ropt,areaopt,rtopt]=als_teste1(X{i,1},sp(i),1,[],.01,isp(i,1));
end
The question is: How can I store these data to each function (i,.e, sp1, sp2, sp3....or copt1 copt2...etc) because I tried to use:
sp(i,1)=sp
??? Subscripted assignment dimension mismatch.
First function give me a number of pure spectrum, so each input that I use, I have a different Matrix (i.e...to sp1=400X4, sp2=400X3, the different is in the columns)
Someone could help me?
Thanks

采纳的回答

Oleg Komarov
Oleg Komarov 2011-9-11
use a cell array:
sp = cell(Seg,1)
in the loop:
sp{i} = ...;

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by