필터 지우기
필터 지우기

how to write the result as matrix

조회 수: 1 (최근 30일)
BANI tita
BANI tita 2012년 11월 19일
hello, I have the following code gave me that PA and PT as vectors ,my question how to save data PA and PT in form matrix of 220 columns
NC=16;
PA=[];
PT=[];
for n=1:NC
for t=1:220
%for t=S
tt = logical(masquea(:,:,n));
tt = tt(:);
ff=logical(masquet(:,:,n));
ff=ff(:);
Im=HYPERD(:,:,t);
Im=Im(:);
PA = [PA;Im(tt)];%%the problem arises in this line
PT=[PT;Im(ff)];
end
end end

답변 (1개)

Matt J
Matt J 2012년 11월 19일
No need to loop over t:
PA=reshape(HYPERD(:,:,tt),[],220);
PT=reshape(HYPERD(:,:,ff),[],220);

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by