MATLAB: Assign values for the list of numbers in the column from a look up lable assign 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; Best Answer x(y) Related SolutionsMATLAB: I would like to understand this statement in matlab: x=y(z) where y and z are both vectors Hi,x gets the value of y which is found at index z in y.y=5:9z=3x=y(z)results in x = 7, since 7 is found at index number 3 in y.See the documentation for further information.Best regardsStephan MATLAB: Reallocate values in matrix to even the values n = size(Y);lo = ~eye(n);Y(lo) = max(Y(lo),5); Related QuestionHow to choose a set of columns from the table. I have to get the means of let’s say columns 1 and 5, columns 2 and 6 etc from 20 columns. ThanksAdding 32 to specific indices in a vectorSimple question regarding sortingSelect and remove/replace values in matrixI have a system of 3 linear equations with 2 variables. I can solve it by substitution but not with linsolve.Matrix value change with conditions (x=y*(mask==1))
Best Answer