From: subbu on
Hi

How to export matlab variable in fortran f10.3 format?

My matlab variable contains a big matrix (21 rows x 121 columns) and the values look like this
1559.25000000000
So i want to export all the matrix into fortran format f10.3

please help me.

thanks you in advance
From: TideMan on
On May 13, 12:03 pm, "subbu " <ysr...(a)yahoo.com> wrote:
> Hi
>
> How to export matlab variable in fortran f10.3 format?
>
> My matlab variable contains a big matrix (21 rows x 121  columns) and the values look like this
> 1559.25000000000
> So i want to export all the matrix into fortran format f10.3
>
> please help me.
>
> thanks you in advance


fprintf(fid,[repmat('%10.3f',1,121) '\n'],M');

From: subbu on
TideMan <mulgor(a)gmail.com> wrote in message <8c0181bb-1f8c-407e-9f59-258d6953e86c(a)s4g2000prh.googlegroups.com>...
> On May 13, 12:03 pm, "subbu " <ysr...(a)yahoo.com> wrote:
> > Hi
> >
> > How to export matlab variable in fortran f10.3 format?
> >
> > My matlab variable contains a big matrix (21 rows x 121  columns) and the values look like this
> > 1559.25000000000
> > So i want to export all the matrix into fortran format f10.3
> >
> > please help me.
> >
> > thanks you in advance
>
>
> fprintf(fid,[repmat('%10.3f',1,121) '\n'],M');

Dear TideMan,
Thanks a lot. It really helped me a lot.
Have a good evening