how to save the values

1 次查看(过去 30 天)
ajith
ajith 2013-6-3
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 个评论
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 个)

类别

Help CenterFile 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