saving . . . saved Executing multiple cases has been deleted. Executing multiple cases has been hidden .
Executing multiple cases
Title
Question
How to execute multiple cases if the condition is true in a select statement?

Scilab Conditional-Branching 03-04 min 50-60 sec 04-05-19, 12:02 p.m. poornimanaik

Answers:

Add the tasks to the same true case.

For example, you want to add a and b, and then multiply c and d, if a condition is true. Do the following:
select x;
case x == true
    a+b
    c+d
so on and so forth...




04-05-19, 12:07 p.m. siddharth11235@gmail.com


Not multiple statements, multiple cases
04-05-19, 12:14 p.m. poornimanaik


x='B'
select x;
case x =='A'
    disp(x)
case x=='B'
    disp(x)
case x=='C'
    disp(x)
end
     
you can write multiple cases like this
04-05-19, 12:32 p.m. PriyaBhatnagar


Log-in to answer to this question.