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: using matlab in batch mode
Replies: 7   Last Post: Jul 8, 2008 4:02 AM

Advanced Search

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

Posts: 3,922
Registered: 12/7/04
Re: using matlab in batch mode
Posted: Jul 7, 2008 1:05 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Jul 7, 4:35 pm, mauro <> wrote:
> Hi,
> I want to use matlab in batch mode, but I don't know how to proceed!
> I explain the problem: I will have access to my machine (when I used
> to play with matlab, and where I have all the settings/datasets/etc)
> but I will have only an "ssh" connection to that PC, so I will have
> only a command line! No chances to work graphically! The idea is to
> just run the .m without using any graphics, and without changing the
> settings (changing the settings of Matlab in such machine is a
> trouble). What I want is "just" run a .m file, as I do in the
> graphical environment (click on the "run" button) but without opening
> matlab (I have no support for graphics with my ssh). Is it possible?
> cheers,
> Mauro

You can run Matlab from a command line (in Windows or Unix) using:
matlab -r mfile
You need to put an exit as the last line of mfile.m so that the
session gets terminated.
Otherwise the Matlab window will remain open and everytime you execute
the command you will open a new window. I once ended up with 40
Matlabs open when I forgot to insert an exit.
One nice feature about this process is that it uses the path that you
have already set up.

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.