From: David on

> It looks like you should have written something like:
> print h subj(s) 'averagegain.jpg'
>
> Good luck.

I tried print and am getting this message now:

??? Error using ==> graphics\private\name at 307
Error using ==> graphics\private\name at 94
Cannot create output file '.

Error in ==> dilation_image at 169
print('-f1', filename);

I couldn't have the line you suggested because matlab says:
Multiple inputs that look like filenames: 'h' and 'subj(s)'

Anyway, if anyone has any idea why matlab can't make my output file, let me know. THanks!

This is part of the script I'm currently using:


filename= ['%daveragegain.bmp',subj(s)];
print('-f1', filename);
From: Richard Quist on
David wrote:
>> It looks like you should have written something like:
>> print h subj(s) 'averagegain.jpg'
>>
>> Good luck.
>
> I tried print and am getting this message now:
>
> ??? Error using ==> graphics\private\name at 307
> Error using ==> graphics\private\name at 94
> Cannot create output file '.
>
> Error in ==> dilation_image at 169
> print('-f1', filename);
>
> I couldn't have the line you suggested because matlab says:
> Multiple inputs that look like filenames: 'h' and 'subj(s)'
>
> Anyway, if anyone has any idea why matlab can't make my output file, let me know. THanks!
>
> This is part of the script I'm currently using:
>
>
> filename= ['%daveragegain.bmp',subj(s)];
> print('-f1', filename);

filename= sprintf('%daveragegain.bmp',subj(s));
print('-f1', filename, '-djpeg');

(and you probably want to use 'jpg' instead of 'bmp' for the file extension
since you're trying to create a jpeg file)


--

Richard Quist
Software Developer
The MathWorks, Inc.