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: 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


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 Leong


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.