to store output values function after solved it.

조회 수: 2 (최근 30일)
Alan
Alan 2011년 9월 11일
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