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: How to automatically assign a filename
Replies: 1   Last Post: Jul 31, 2013 12:00 AM

Advanced Search

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

Posts: 1
Registered: 7/30/13
How to automatically assign a filename
Posted: Jul 30, 2013 9:16 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I was wondering how I can assign the filename with a variable's input.
e.g.

aaa= input('Enter Name: ');
fid=fopen('aaa.doc','w');

I want the name entered as the file name, and every different name inputted, to create a new .doc file with that person's name assigned to it.

e.g.
If I run it ...

Enter Name: Meow

and when I look at the files, I see a file named as Meow. Or whatever name is entered.



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.