How to find a specific value from a matrix having columns within columns

2 views (last 30 days)
Hello, I want to know how can we find a specific value from a matrix that has columns within columns. To better understand, I have attached an image of the table from which i am trying to find out specific value. I have witten a code where i am getting the values for neck legs and trunk after which i have to use the attached table to find the corresponding score associated with that. For ex: if the neck score is 1, leg score is 2 and trunk score is 4, we get a value of 5 from the table. It would be great if someone can help me get that value using matlab code. Also, I have created that table in an excel format. I appreciate your help. Thank you!

Accepted Answer

Matt J
Matt J on 26 Jul 2020
Edited: Matt J on 26 Jul 2020
You haven't mentioned in what form you are holding this data, but my recommendation would be to hold it as a 3x4x5 matrix, A. Then, you can simply lookup as for example A(neck_score, leg_score,trunk_score).

More Answers (0)

Categories

Find more on Biomechanics in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!