Re: link all the code



Looks to me like you should investigate cell arrays.

numimage = 5;
x = cell(numimage,1);
B = cell(numimage,1);
y = cell(numimage,1);
for K = 1:numimage
imagename = sprintf('image%d.jpg', K);
x{K} = imread(imagename);
B{K} = double(x{K});
y{K} = abs(fftshift(fft2(B{K})));
end

and so on.


then how to write the loop??? ui try ady..still cannot..i
change the loop but cannot use..i jz one using one loop
only..on my 1st post got five loop

.



Relevant Pages

  • Re: link all the code
    ... Looks to me like you should investigate cell arrays. ... imagename = sprintf; ... how to do the loop for it??as you can see..each image use ...
    (comp.soft-sys.matlab)
  • Re: link all the code
    ... imagename = sprintf; ... using plus..i now wanna using one loop only but in my first ...
    (comp.soft-sys.matlab)
  • Re: link all the code
    ... khoo wrote: ... image..since all image using same loop, how can i do to make ... imagename = sprintf; ... if isempty; error('Quotation server filesystem problems') ...
    (comp.soft-sys.matlab)
  • Re: link all the code
    ... Looks to me like you should investigate cell arrays. ... imagename = sprintf; ... how to make a loop by using cell array?? ...
    (comp.soft-sys.matlab)
  • Changing Variable Names
    ... but to get all my files I would have to manually change the ... the for-loop change the name of the file opened using the ... loop based on the loop number. ... go around it with cell arrays or vector arrays when doing ...
    (comp.soft-sys.matlab)