Date: Nov 6, 2013 3:52 AM
Author: Saravanan Mani
Subject: Re: How to write cell data to the text file

TideMan <mulgor@gmail.com> wrote in message <9cc04338-97f8-4d0b-9f0f-d361340b87a1@googlegroups.com>...
> On Tuesday, November 5, 2013 3:48:07 AM UTC+13, Saravanan Mani wrote:
> > Hello All,
> >
> >
> >
> > I have a cell data, Please see below script. I want to write cell data in Text file. How to write?
> >
> >
> >
> > a = cell(2,2);
> >
> > a{1,1} = 10;
> >
> > a{1,2} = 20;
> >
> > a{2,1} = 30;
> >
> > a{2,2} = 40;
> >
> > fid = fopen('TextFile.txt','w');
> >
> > fwrite(fid,a);
> >
> > fclose(fid)
> >
> >
> >
> > I am getting below error
> >
> >
> >
> > ??? Error using ==> fwrite
> >
> > Cannot write value: unsupported class cell
> >
> >
> >
> > Error in ==> cell_2_text at 14
> >
> > fwrite(fid,a);
> >
> >
> >
> > Thanks,
> >
> > Saravanan

>
> Try:
> fwrite(fid,a{:});


Dear Tideman,

I tryed your method, I am getting error again. it is not writing in Text file.

Best Regards,
Saravanan