![photo](/responsive_image/150/150/0/0/0/cache/matlabcentral/profiles/9321384_1522132167437_DEF.jpg)
Bruno Baptista
2016년부터 활동
Followers: 0 Following: 0
Feeds
답변 있음
How can i put all zeros in the end of the rows in a matrix?
A = [matriz]; At = A'; N = length(A); B = zeros(size(At)); idx = At == 0; B(~sort(idx)) = At(~idx); B=B'
How can i put all zeros in the end of the rows in a matrix?
A = [matriz]; At = A'; N = length(A); B = zeros(size(At)); idx = At == 0; B(~sort(idx)) = At(~idx); B=B'
7년 초과 전 | 0
| 수락됨
질문
How can i put all zeros in the end of the rows in a matrix?
i wanto to put all the zero elemets of a matrix to the end of the rows. For example if i have A=[1 0 2 3 0;1 3 0 2 5;0 2 4 0 1] ...
7년 초과 전 | 답변 수: 2 | 0