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!

programming error message display

Status
Not open for further replies.

xvid

Electrical
Joined
Apr 12, 2005
Messages
3
Location
DE
i want that at certain particular condition, my simulink model should display that 'inputs given are invalid and user should change the inputs'......just wanna make more user interactive model..

is it possible in simulink...if yes, then how?

thanxs in advance

 
Hi, you must write an M-File like this example:
------------------------------------------------
function y=check_jib(x)
if x<0
error('jib is not defined');
else
y=x;
end
--------------------------------------------------
and save it as check_jib.m
Then write your functionname in the "MATLAB-Function-Block"
If the if expression is true, the simulation stops and gives out the error message
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top