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:
Regarding warning messeges

Subject: Regarding warning messeges

From: sk maidul haque

Date: 3 Jan, 2011 08:14:04

Message: 1 of 2

I have used several warning messeges in my program. When the program is called it shows all warnings messeges in single line. How can I make it so that each warning messeges comes separately in each line. '\n' is not doing the job.

I want to take out the value of a parameter calculated within the program with the worning messege.
Suppose the program is following.
x='some expression';
warning('Program could not continue and the value of x is x= ?'). How to put it so that the current value of x, calculated from the expression comes with the worning.

Subject: Regarding warning messeges

From: Steven_Lord

Date: 3 Jan, 2011 14:51:30

Message: 2 of 2



"sk maidul haque" <skmaidulhaque@gmail.com> wrote in message
news:ifs0gc$nn8$1@fred.mathworks.com...
> I have used several warning messeges in my program. When the program is
> called it shows all warnings messeges in single line. How can I make it so
> that each warning messeges comes separately in each line. '\n' is not
> doing the job.

That depends. How are you displaying your warning messages?

> I want to take out the value of a parameter calculated within the program
> with the worning messege. Suppose the program is following.
> x='some expression';
> warning('Program could not continue and the value of x is x= ?'). How to
> put it so that the current value of x, calculated from the expression
> comes with the worning.

See example 2 in the documentation for the WARNING function.

http://www.mathworks.com/help/techdoc/ref/warning.html

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlab.wikia.com/wiki/FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

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