assign values for the list of numbers in the column from a look up lable
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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;
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 2 Aug. 2019
3 Kommentare
Walter Roberson
am 2 Aug. 2019
[y, x(y)]
Provided that x and y are both column vectors like you show in your question.
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!