Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Change Matlab Command Line Prompt

Subject: Change Matlab Command Line Prompt

From: Michele

Date: 30 Jul, 2009 01:14:01

Message: 1 of 10

Is there a way to change the command line prompt to a string of the user's own choosing? (v. 6.5 R13 if it matters).

Subject: Change Matlab Command Line Prompt

From: Matt Fig

Date: 30 Jul, 2009 02:35:05

Message: 2 of 10

Not that I know of.

Subject: Change Matlab Command Line Prompt

From: dpb

Date: 30 Jul, 2009 02:47:46

Message: 3 of 10

Matt Fig wrote:
> Not that I know of.

And, "whatever for:" or in Dr Laura's words, "what _useful_ purpose
would that information serve?"

--

Subject: Change Matlab Command Line Prompt

From: Matt Fig

Date: 30 Jul, 2009 03:10:18

Message: 4 of 10

dpb <none@non.net> wrote in message <h4r298$mkb$2@news.eternal-september.org>...
> Matt Fig wrote:
> > Not that I know of.
>
> And, "whatever for:" or in Dr Laura's words, "what _useful_ purpose
> would that information serve?"
>


Well, it could be kind of like an M-Lint type thing.
The prompt starts out as >>, then if you type something that MATLAB knows will fail, it goes to !!. If you type eval, the prompt turns to ?! and if you leave out a parenthesis it turns to () etc.

Subject: Change Matlab Command Line Prompt

From: Steven Lord

Date: 30 Jul, 2009 14:11:30

Message: 5 of 10


"Matt Fig" <spamanon@yahoo.com> wrote in message
news:h4r2uq$alv$1@fred.mathworks.com...
> dpb <none@non.net> wrote in message
> <h4r298$mkb$2@news.eternal-september.org>...
>> Matt Fig wrote:
>> > Not that I know of.
>>
>> And, "whatever for:" or in Dr Laura's words, "what _useful_ purpose
>> would that information serve?"
>>
>
>
> Well, it could be kind of like an M-Lint type thing.
> The prompt starts out as >>, then if you type something that MATLAB knows
> will fail, it goes to !!. If you type eval, the prompt turns to ?! and if
> you leave out a parenthesis it turns to () etc.

And if you type something that's really going to cause trouble, should it
change to something like "$*%!" ? :)

But no, there's no way to change the prompt to an arbitrary string. MATLAB
will change it in certain circumstances (the most common being the K>>
prompt for debug mode) but that's not something the user can really control
(aside from determining when MATLAB enters debug mode, of course.)

--
Steve Lord
slord@mathworks.com

Subject: Change Matlab Command Line Prompt

From: Michele

Date: 30 Jul, 2009 16:24:02

Message: 6 of 10

dpb <none@non.net> wrote in message <h4r298$mkb$2@news.eternal-september.org>...
> Matt Fig wrote:
> > Not that I know of.
>
> And, "whatever for:" or in Dr Laura's words, "what _useful_ purpose
> would that information serve?"
>

Well if you really want to know, I was waxing nostalgic for Interlisp-D the other day and just thought it would be cool to give Matlab the same prompt it used to use. I don't know - why do some people customize their cars?

Subject: Change Matlab Command Line Prompt

From: dpb

Date: 30 Jul, 2009 17:39:02

Message: 7 of 10

Michele wrote:
> dpb <none@non.net> wrote in message
> <h4r298$mkb$2@news.eternal-september.org>...
>> Matt Fig wrote:
>>> Not that I know of.
>> And, "whatever for:" or in Dr Laura's words, "what _useful_ purpose
>> would that information serve?"
>>
>
> Well if you really want to know, I was waxing nostalgic for
> Interlisp-D the other day and just thought it would be cool to give
> Matlab the same prompt it used to use. I don't know - why do some
> people customize their cars?

OK...just cosmetics is a reason. Not necessarily a really good one,
but... :) (and do take the smiley at full face value++++).

--

Subject: Change Matlab Command Line Prompt

From: Anthony

Date: 17 Mar, 2011 20:40:20

Message: 8 of 10

I wound find it extremely useful to be able to print the pwd in my prompt, like:

/home/tony >>

dpb <none@non.net> wrote in message <h4r298$mkb$2@news.eternal-september.org>...
> Matt Fig wrote:
> > Not that I know of.
>
> And, "whatever for:" or in Dr Laura's words, "what _useful_ purpose
> would that information serve?"
>
> --

Subject: Change Matlab Command Line Prompt

From: Reza Farrahi Moghaddam

Date: 3 May, 2013 03:20:10

Message: 9 of 10

"Anthony" wrote in message <iltrjk$sfe$1@ginger.mathworks.com>...
> I wound find it extremely useful to be able to print the pwd in my prompt, like:
>
> /home/tony >>
>
> dpb <none@non.net> wrote in message <h4r298$mkb$2@news.eternal-september.org>...
> > Matt Fig wrote:
> > > Not that I know of.
> >
> > And, "whatever for:" or in Dr Laura's words, "what _useful_ purpose
> > would that information serve?"
> >
> > --

Maybe, this is an answer:

http://www.mathworks.com/matlabcentral/fileexchange/26471-setprompt-set-the-command-window-prompt

Subject: Change Matlab Command Line Prompt

From: Michele

Date: 3 May, 2013 04:37:11

Message: 10 of 10

> Maybe, this is an answer:
>
> http://www.mathworks.com/matlabcentral/fileexchange/26471-setprompt-set-the-command-window-prompt

That looks like just what I was looking for. Too bad it's only for Matlab 7. I'm still running 6R13.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us