Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

display errors 1

Status
Not open for further replies.

suigeneris

Computer
Apr 23, 2003
8
DE
Hi,

probably a simple one again, but I haven´t found anything yet.

To display a simple error:
error ('too many arguments') alright that easy!

But I need a dynamic error message. I have a variable which I need to get displayed in the error message. E.g.

framenumber=56
and now I need something like:

error('Entry is invalid. Valid arguments are 1 to',...
framenumber '.')

Then the display should show:

error:

Entry is invalid. Valid arguments are 1 to 56 .

How can I realize that?

Thank alot

sui
 
Replies continue below

Recommended for you

error(['Entry is invalid, Valid arguments are 1 to ' int2str(framenumber)]);

M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top