×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

programming error message display

programming error message display

programming error message display

(OP)
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

RE: programming error message display

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources