MATLAB Answers

Teemu

How can I save matrix to .txt file?

Asked by Teemu
on 13 Mar 2013

I have numerical matrix size of 64*60 and I like to save it to .txt file. How can I do it as easy as possible? without repeating %d with fprintf?

  0 Comments

Products

No products are associated with this question.

1 Answer

Answer by Friedrich
on 13 Mar 2013
Edited by Friedrich
on 13 Mar 2013
 Accepted answer

Hi,

use dlmwrite

 a = rand(64,60);
 dlmwrite('filename.txt',a)

  1 Comment

Teemu
on 13 Mar 2013

Now it's working. Thanks!


Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply today