i have a matrix=a=[1 0 1 0 1;0 1 1 1 1;1 1 0 1 1;1 1 1 1 1] i want to replace ones by their no of occurences in each row like a=[1 0 2 0 3;0 1 2 3 4;1 2 0 3 4;1 2 3 4 5]
MATLAB: How can i replace a number with its no of ocurrences
replacing a number with no. of occurences
Related Question
- Logical arry indexing: how to extract columns that match a criterion
- I want to take each row in matrix
- Dear all:I have a 6* 3 matrix. I wanna choose 4rows randomly. how can I selecete all array in a rows randomly without replacement
- How can i find an eleiment which comes only one in a matrix ????
- How to extract a certain row out of a matrix
- Closest coordinate points between 2 data sets
- Matrix
Best Answer