how to save the values

how to save the all values of latent in the set of images if i run the code only the 7 image values only save how to reslove the problem
clc
clear all;
warning off all;
for loop=1:7
figname=strcat(sprintf('CLL (%d).png',loop));
img=double(imread(figname));
[pc, score,latent,tsquare] = princomp(img);
latent=latent(1:400,:);
latent=latent';
end

 채택된 답변

Andrei Bobrov
Andrei Bobrov 2013년 6월 3일
편집: Andrei Bobrov 2013년 6월 3일

0 개 추천

latent = zeros(7,400);
for loop=1:7
figname=strcat(sprintf('CLL (%d).png',loop));
img=double(imread(figname));
[~,~,l0] = princomp(img);
latent(loop,:) = l0(1:400).';
end

댓글 수: 7

ajith
ajith 2013년 6월 3일
편집: ajith 2013년 6월 3일
sir how to perform these actions
latent=latent(1:400,:);
latent=latent';
.
.
.
latent7=latent7(1:400,:);
latent7=latent7';
q=[latent;latent1;latent2;latent3;latent4;latent5;latent6;latent7;];
Andrei Bobrov
Andrei Bobrov 2013년 6월 3일
see my answer
ajith
ajith 2013년 6월 3일
out = cell(7,3);
for loop=1:7
figname=strcat(sprintf('CLL (%d).png',loop));
img=double(imread(figname));
[out{loop,:}] = princomp(img);
end
s=out{1,3};s=s(1:400,:);s=s';
s1=out{2,3};s1=s1(1:400,:);s1=s1';
s2=out{3,3};s2=s2(1:400,:);s2=s2';
s3=out{4,3};s3=s3(1:400,:);s3=s3';
s4=out{5,3};s4=s4(1:400,:);s4=s4';
s5=out{6,3};s5=s5(1:400,:);s5=s5';
s6=out{7,3};s6=s6(1:400,:);s6=s6';
q=[s;s1;s2;s3;s4;s5;s6;];
from your prefered link i find how to access the cell... i need to know using the loop its possible to find the 'q' is possible or not sir
ajith
ajith 2013년 6월 3일
Mr. Andrei Babrov sir, using your code if its possible to change
1x400
.
.
. 1X400 into the
7X400 IS POSSIBLE SIR
Andrei Bobrov
Andrei Bobrov 2013년 6월 3일
편집: Andrei Bobrov 2013년 6월 3일
answer as corrected
ajith
ajith 2013년 6월 4일
thanks a lot sir

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Dimensionality Reduction and Feature Extraction에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by