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: parfor: keep outputs with same output filename
Replies: 12   Last Post: Aug 1, 2013 2:35 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Steven Lord

Posts: 17,944
Registered: 12/7/04
Re: parfor: keep outputs with same output filename
Posted: Jul 23, 2012 10:15 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply



"Torsten" <Torsten.Hennig@umsicht.fraunhofer.de> wrote in message
news:1f1093fd-7d4b-4559-882c-5882aac33074@h20g2000yqe.googlegroups.com...

*snip*

> Filenames in MATLAB have to start with a letter.
> Look at "Naming Other Files" under
> http://www.mathworks.de/help/techdoc/matlab_prog/f10-61281.html


This is true for MATLAB program files, but MATLAB can write to a data file
whose name starts with a number or other symbol perfectly well.

fid = fopen('1234567.txt', 'wt');
for k = 1:10
fprintf(fid, '%d\t%d\n', k, k.^2);
end
fclose(fid);
type 1234567.txt

1 1
2 4
3 9
4 16
5 25
6 36
7 49
8 64
9 81
10 100

That documentation section to which you linked appears to be incorrect.
MEX-file names do need to satisfy the requirements other MATLAB program
files need to satisfy (ISVARNAME) but MAT-files don't necessarily need to do
so. I'm not certain about Simulink model files, though I'd guess they fall
in the program file category. I'll note that to the documentation staff.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com




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

[Privacy Policy] [Terms of Use]

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