MATLAB: How to find number in a matrix and output its row number matrix array I have a coloumn vector M = [83 82 86 84 85 90] How can I find at which row the matrix has a value of 85 (should output row = 5 since 85 is on the 5th row) Best Answer M = [83 82 86 84 85 90].'M = 6×1 83 82 86 84 85 90 [row, column] = find(M == 85)row = 5column = 1 Related SolutionsMATLAB: How to decrease the number of points in a matrix I suggest http://www.mathworks.com/help/matlab/ref/spline.htmlx = 1 : length(psdn);x128 = linspace(x(1), x(end), 128);p128 = spline(x, psdn, x128);plot(x128, p128); MATLAB: Function repeat number combvec() from the Deep learning toolbox is most easiest solutiona = [1 2 3]b = [1 2 3]C = combvec(a, b).'; % if the order of column is important: C = fliplr(combvec(a, b).');The other solution is to use ndgrid()a = [1 2 3]b = [1 2 3][A, B] = ndgrid(a, b);C = [B(:) A(:)] Related QuestionHow to count specific numbers in a matrixGenerate random’s numberWhat’s the licence numberHow to get the column and vector of 2nd ones in a matricesI get Error while reading CSV file.How to recognize the number
Best Answer