Code covered by the BSD License  

Highlights from
Matrix to file

1.0

1.0 | 1 rating Rate this file 4 Downloads (last 30 days) File Size: 1.27 KB File ID: #24448

Matrix to file

by Nicolai Sten

 

16 Jun 2009

Writes matrix to a file. Arguments: matrix and file-name

| Watch this File

File Information
Description

The matrix 'A' is written to the file 'name' by giving the matrix and the full file-name as arguments.
Ex: Matrix2file(A,'Cirkus.txt') writes the matrix A to the file Cirkus.txt - using tabulator separation and exponential notation - uppercase e.

MATLAB release MATLAB 7.5 (R2007b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (5)
16 Jun 2009 Anon

Why do you submit a function that already exists? This function does only a subset of what dlmwrite can do. You may want to improve this function so that it can write cell arrays with mixed data types. Yet, I am quite sure that something like this already exists on the FEX. Moreover, this submission lacks reasonable help and an H1 line. Sorry, but so far I don't see much value in this submission.

17 Jun 2009 Nicolai Sten

I have been looking for the dlmwrite-function for 1½ month now - according to subscriptions on any online fora that I found, I'm not the only one. You won't find it unless you use a search including "ASCII", which I know now.
What can I say - it helped me and others, that didn't knew how to find dlmwrite - might be because of the unlogical name (:

19 Jun 2009 Anon

When you and others experienced this problem with finding dlmwrite, than this should encourage you to take even more care to give a good documentation for your function.

A good documentation should provide an H1-line (the very first line in the help block of your function)
http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/matlab_prog/f7-41453.html&http://www.google.ch/search?q=h1+line+mathworks&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:de:official&client=firefox-a

, a good description and syntax of the function. Moreover, providing an example of the function usage is always a good help for others.

dlmwrite might be difficult to find, yet, once found, it still provides a more powerful tool than this function due to its flexibility. Still, it lacks some features such as adding header lines/column names or supporting cell arrays. I'd like to see, that you should built upon these shortcomings and include such functionalities (in case you have the time to do so).
  

19 Jun 2009 us

as was mentioned above, there is (at least) one FEX submission, which does this - with a lot of options...

http://www.mathworks.com/matlabcentral/fileexchange/23840

us

23 Jun 2009 Carlos Adrian Vargas Aguilera

here is another, ;)

http://www.mathworks.com/matlabcentral/fileexchange/10243

Carlos

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
write Nicolai Sten 16 Jun 2009 10:47:54
matrix Nicolai Sten 16 Jun 2009 10:47:54
file Nicolai Sten 16 Jun 2009 10:47:54
fprintf Nicolai Sten 16 Jun 2009 10:47:54
tex Nicolai Sten 16 Jun 2009 10:47:54

Contact us at files@mathworks.com