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
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 个评论

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;];
see my answer
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
Mr. Andrei Babrov sir, using your code if its possible to change
1x400
.
.
. 1X400 into the
7X400 IS POSSIBLE SIR
answer as corrected
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