Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski 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
Joined
Apr 23, 2003
Messages
8
Location
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
 
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