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: Q - loading userinput file.
Replies: 1   Last Post: Sep 17, 1996 10:38 AM

Advanced Search

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

Posts: 8
Registered: 12/7/04
Q - loading userinput file.
Posted: Sep 12, 1996 9:44 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello,

I have been trying to find out how to load in a standard ascii
file containing a simple matrix but the filename is entered by the user.
Could anyone please show me how to do this in matlab script file?

At the moment I just use the line :
load file.dat (ie extension of file is .dat)

in which the matrix 'file' is created in matlab. My script then works
this matrix name 'file'.

Is there anyway which I can change the script to get the user to enter a
filename instead of having it fixed in the script? Ie tried the :
file = input('enter file name','s')
load file


But I am totally off the track.

Thank you very much for your help,

Kenny

--
Kenny Leong

email: Kenneth.Leong@marlin.jcu.edu.au





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.