to store output values function after solved it.

1 visualización (últimos 30 días)
Alan
Alan el 11 de Sept. de 2011
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

Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre Shifting and Sorting Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by