I'm trying to use eval function with for loop
B1=sinc(x).*sinc(y);B2=sinc(2x).*sinc(2y);B3=sinc(3x).*sinc(3y);B4=sinc(4x).*sinc(4y);B5=sinc(5x).*sinc(5y);for i=1:5 s=['imwrite(B' num2str(i) ','B_' num2str(i) '.bmp')'] eval(s);end
But this sentence does not make sense since in some elements in "s" there are 3 apostrophe,
which is impossible for computer to compute.
Also, imwrite function got to have apostrophe for file name….
how do i make a breakthrough?
Best Answer