I want to find the definition from the library that the result corresponds to

1 view (last 30 days)
I have a library in excel format. A.xlsx
I am working on a code that finds out which letter corresponds to the number I found as a result of the calculations I have made and writes it to the screen. For example, I calculated 50+30. Result=80. Code should examine the library and write on the screen that 80 is C. Can you help with this?

Answers (1)

Walter Roberson
Walter Roberson on 29 Nov 2021
For the question you asked:
Use ismember() to search for an exact match.
For the question that you did not ask:
sum(score<=key) to find the index.
Watch out for scores less than the minimum or greater the maximum.

Categories

Find more on Data Import from MATLAB in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!