Rank: Newbie
Groups: Registered
Joined: 30/04/2020(UTC) Posts: 2 Location: Bangalore
|
Hi I am new to Smath
I want to select few variables. eg If P=1, then X = 1, Y=2 & Z=3 If P=2, then X = 4, Y=1 & Z=7 If P=3, then X = 3, Y=2 & Z=1
I want to use X, Y & Z values based on the selected value of P
Thanks in advance
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 30/04/2020(UTC) Posts: 2 Location: Bangalore
|
Thanks Jean
I will try this one
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 05/06/2014(UTC) Posts: 348 Location: Colombo Was thanked: 125 time(s) in 82 post(s)
|
Using "cases" function. cases_ex.sm (90kb) downloaded 9 time(s).Edited by user 30 April 2020 14:46:31(UTC)
| Reason: Not specified |
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka |
1 user thanked ndtma for this useful post.
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: Praveenpk I will try this one Page1 if_oterwise.sm (5kb) downloaded 9 time(s).
|
1 user thanked Jean Giraud for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 30/03/2020(UTC) Posts: 31 Location: KU Was thanked: 3 time(s) in 2 post(s)
|
If you want to use the variable names X,Y,Z a simple data:mat(1,4,3,2,1,2,3,7,1,3,3) mat(X,Y,Z,3,1):col(data,p) will do the job. you can also use a vector XYZ XYZ:el(data,range(1,3),p) and its components i=1..3 el(XYZ,i) -- copy code to sheet Edited by user 30 April 2020 17:35:07(UTC)
| Reason: Not specified
|
1 user thanked hawe for this useful post.
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Generalize demo. No sweat to capture [X,Y,Z] from n*m matrix. Page5 Generalize.sm (6kb) downloaded 19 time(s).
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.