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;];
Walter Roberson
Walter Roberson 2013 年 6 月 3 日
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