I have a matrix a = [ 1 11; 2 11; 3 12; 4 12; 5 13; 6 13] and b = [1;1;2;3;4;3;5;5;2;3] I want a new column in b based on the second column from a matrix i.e the output should be b = [1 11; 1 11; 2 11; 3 12; 4 12; 3 12; 5 13; 5 13; 2 11; 3 12]. Please can anyone help as soon as possible. it is very urgent!! Waiting for answers, Thanks in advance.
MATLAB: New column in matrix based on condition from other matrix
new column in matrix based on condition from other matrix
Related Question
- Aggregating numbers based on first column index
- Replace numbers in a matrix depending on if statement
- How to add two values to a matrix each five values of that matrix in order to have a new matrix
- Sorting from highest to lowest for a particular column
- How to multiply a vector with each column of a matrix
- How to seperate data from matrix based on a given condition
- Deleting specific rows in an array based on values in another array
Best Answer