From: Dave on
Hello all,

I tried to save my data in a text file and tried to save an image in a folder.In both the cases I got undesired results.Could any one write me where I went wrong.

==> To create a new directory I used mkdir().

status = mkdir('G:\firstdirectory')

status value was 1.So the directory is created.When I looked for firstdirectory
in G drive I didn't find it.

==>To create and open a text file I used fopen()

textpath ='G:\testtext.txt';
fid = fopen(textpath,'w');
fprintf(fid,'\t\t');
for i=1:arrlen
fprintf(fid,'%7d \n',values(i));
end

No error was fired when I run this file but the text file neither filled with the
details nor new one is created.

==>To save my image I used imwrite()

How can I save my image using imwrite() in a specific directory . Can I give the
path in imwrite(). ?

I tried using fullfile() method with imwrite() but got error saying that the
directory I specified has no write permission so can't open.

==>Finally, instead of writing my data in a text file I want to write them in an excel
file vertically(I will get multiple value sets) one set after other. How can I do
that?


Could any one help me.I would be greatful to you

Regards,
Dave