Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Help me please.Write some data to *.txt
Replies: 3   Last Post: Mar 17, 2013 11:04 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Nasser Abbasi

Posts: 5,063
Registered: 2/7/05
Re: Help me please.Write some data to *.txt
Posted: Mar 17, 2013 2:19 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 3/16/2013 11:38 PM, As'adul wrote:

> I have matrix, let's say 8*40 of size and then I want for each row
>I can write it in a *.txt file.
> So because we have 40 rows


You mean 40 columns? when one write size=8 by 40, then the first number
means number of rows, ot columns.

Are you sure you want 40 rows 8 rows?

>then we have 40 *.txt files with each of it has name file of, say,
>file1.txt,file2.txt, and so on.
>
> How can I make it?.Please anybody?
>



So you want to write each row to separate file?

How about make a loop? have you tried Matlab's

http://www.mathworks.com/help/matlab/import_export/ways-to-write-to-text-files.html

Take it easy at first. Try to see if you can write ONE row.

If you can do that, then you can make a function of that code
and then put the function in a loop.

--Nasser



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2013. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.