assign values for the list of numbers in the column from a look up lable

3 views (last 30 days)
I have a table
x = [10; 20; 30; 40; 50;]; %look up table
and i have y =
1
4
5
and I want to assign 1=10; 4=40; 5=50;
and so if i have new values of y =
2
5
then I assign 2=20; 5=50;

Accepted Answer

Walter Roberson
Walter Roberson on 2 Aug 2019
  3 Comments
JL
JL on 8 Aug 2019
Hi Walter, I have another intetesting problem, was wondering if you are interested to take a look - here is the link to the question https://uk.mathworks.com/matlabcentral/answers/475460-sharing-values-of-elements-in-a-matrix

Sign in to comment.

More Answers (1)

JL
JL on 2 Aug 2019
Thanks Walter, it is working!

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!