Given a matrix A, return a new matrix of the same size in which the biggest element of each column in A takes 1, and 0 for all the others. So if:
input A = [5 4 3;
1 5 6;
3 0 9]
output a = [1 0 0;
0 1 0;
0 0 1]
Matrix with different incremental runs
Given a 4x4 matrix, swap the two middle columns
Side of a rhombus
Check availability of a number in an array
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office