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.

how to do the loop for it??as you can see..each image use
same loop..but i want use same loop but different images

.



Relevant Pages

  • 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
    ... Looks to me like you should investigate cell arrays. ... imagename = sprintf; ... change the loop but cannot use..i jz one using one loop ...
    (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)
  • Re: for in for
    ... While I am always glad to see cell arrays instead of dynamically named ... diff will be a rectangular matrix. ... the end of this loop, you don't need to index them, and you probably ...
    (comp.soft-sys.matlab)