How to apply 5 condition in Matlab

Home Forums Matlab How to apply 5 condition in Matlab

This topic contains 3 replies, has 2 voices, and was last updated by  cK 9 years, 1 month ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #587

    pankaj kumar
    Participant

    For given attachment May I know how to write switch/condition for 5 different cases in which for case 2 and 4 variable depend on just previous state?

    Attachments:
    You must be logged in to view attached files.
    #589

    cK
    Keymaster

    if x< -A
    ...
    elseif x==-A

    elseif x > -A && x < A

    elseif x==A

    elseif x>A

    end

    #590

    pankaj kumar
    Participant

    Thank you!But as shown in attachment for case 2 and 4 variable depends on just previous state….

    #591

    cK
    Keymaster

    So, it be. What’s wrong if a case depend (or do not depend) on something?

    • This reply was modified 9 years, 1 month ago by  cK.
    • This reply was modified 9 years, 1 month ago by  cK.
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.