The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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: 18,038
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" <> wrote in message


> Filenames in MATLAB have to start with a letter.
> Look at "Naming Other Files" under

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);
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
To contact Technical Support use the Contact Us link on

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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.