Choosing value from table (matrix)

Choosing value from table (matrix) - Choosing value in second row by value of first row - Messages

#1 Posted: 3/2/2015 2:55:49 AM
mbdj

mbdj

0 likes in 5 posts.

Group: User

Dear users of smath forum, I want to ask question.

How to choose value from second row of "table" by coincidence value "a" with value of first row of "table".
It should be something like "vlookup" in excel.

See below example what I've done, but it do not work.

Could you please help me to write this correctly.




2015-03-02_111946.png
#2 Posted: 3/2/2015 5:43:53 AM
Davide Carpi

Davide Carpi

1416 likes in 2873 posts.

Group: Moderator

I guess you have to handle in a better way the range bounds (and there's no needs of nesting loops). In your example the last iteration fails because you call for the cols(table)+1 column of the matrix.

An example here

If you are looking for interpolation InterpBilinear() may helps
2015-03-02 08_15_26-Choosing value from table (matrix) - Questions - SMath Studio Forum.png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 users liked this post
mbdj 3/4/2015 4:58:00 AM
#3 Posted: 3/4/2015 5:00:46 AM
mbdj

mbdj

0 likes in 5 posts.

Group: User

Thank you very much, your post is very helpful.

Yes, I look for way to create bilinear interpolation.
  • New Posts New Posts
  • No New Posts No New Posts