For Programmers: Free Programming Magazines  


Home > Archive > Matlab > June 2007 > Saving array to *.m file









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Saving array to *.m file
Depends

2007-06-30, 8:12 am

Hi,

I need help with one issue. The thing is I need to create *.m file in
this format:

Column1 Column2 Column3
Row1 Data1 Data2 Data3
Row2 Data4 Data5 Data6

Creating structure is not a problem but I am very suspicious about it
because I need to update and change entered data.What is the best way
to organize data in this format so that it can be read and updated.
This should be saved in *.m file.If the structure can be saved in
this format in the form of m file,how that can be done.

I guess fopen,save, could do the work but I am not sure.

Any suggestions how to handle this?

Thnks,
Praetorian

2007-06-30, 7:12 pm

On Jun 30, 7:12 am, Depends <velim...@gmail.com> wrote:
> Hi,
>
> I need help with one issue. The thing is I need to create *.m file in
> this format:
>
> Column1 Column2 Column3
> Row1 Data1 Data2 Data3
> Row2 Data4 Data5 Data6
>
> Creating structure is not a problem but I am very suspicious about it
> because I need to update and change entered data.What is the best way
> to organize data in this format so that it can be read and updated.
> This should be saved in *.m file.If the structure can be saved in
> this format in the form of m file,how that can be done.
>
> I guess fopen,save, could do the work but I am not sure.
>
> Any suggestions how to handle this?
>
> Thnks,


Why does it have to be in M file format? MAT files are much more
suited to saving, retrieving and changing data. Take a look at the
SAVE and LOAD functions.

HTH,
Ashish.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com