Re: left adjusting the matrix with unique elements
- From: Jos <x@xxx>
- Date: Sun, 30 Apr 2006 13:44:01 -0400
monarc wrote:
< discussion of problem
you may turn to sort
% an example
A = [1900 1 0 2 0 3 ; 1901 0 0 0 0 1 ; 1902 1 2 3 0 4] ;
B = A(:,2:end) ;
B(B==0) = inf ;
B = sort(B,2) ; % sort each row
B(isinf(B)) = 0 ;
B = [A(:,1) B] ;
hth
Jos
.
- Follow-Ups:
- Re: left adjusting the matrix with unique elements
- From: monarc
- Re: left adjusting the matrix with unique elements
- References:
- left adjusting the matrix with unique elements
- From: monarc
- Re: left adjusting the matrix with unique elements
- From: Roger Stafford
- Re: left adjusting the matrix with unique elements
- From: monardc
- Re: left adjusting the matrix with unique elements
- From: Roger Stafford
- Re: left adjusting the matrix with unique elements
- From: monarc
- left adjusting the matrix with unique elements
- Prev by Date: how to do "image line counting"
- Next by Date: .mat file conversion for Excel
- Previous by thread: Re: left adjusting the matrix with unique elements
- Next by thread: Re: left adjusting the matrix with unique elements
- Index(es):