I am trying to manipulate and save an image to file and it doesn't seem to be working from a function. It does, however, work in the command window. I have tried save, saveas, fprint, and others with no luck.
A = imread('contourSS.jpg'); B = rgb2gray(A);
imwrite(B, 'new_image.gif', 'gif');
Nothing shows up in the MATLAB directory when I run this code from a function, but it does show up in the MATLAB directory when I run it from the command window. Any ideas?
Thanks in advance.