cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Inserting the Matrices using if function

ptc-4605467
1-Newbie

Inserting the Matrices using if function

Hello Friends,

I am facing a problem for putting a IF function for a matrics

a=(1

2

3

-5

10)

Thats a is in matrics format.

WL=3

if function reqired that

h= if a>WL then WL

else if a<0 then 0

else WL

Now i am not getting the solution due to "a" is in matrics format and WL is a scalar format

and i want "h" also as matrics format.

Expected answer of h=(1

2

3

0

3) But i want to know how to write the programm for that

1 REPLY 1

Top Tags