Re: left adjusting the matrix with unique elements
- From: monarc <monarc_74@xxxxxxxxx>
- Date: Sun, 30 Apr 2006 14:35:52 -0400
Jos,
You nailed it!!!Can I ask you for one further help??I will really
appreciate it.
Now how do I replace each number with corresponding alphabet...I mean
replace 1 with "A", 2 with "B", 3 with "C", 4 with "D" etc...Any neat
way to do it??
thanks
Jos wrote:
.
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
- References:
- 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
- Re: left adjusting the matrix with unique elements
- From: Jos
- Re: left adjusting the matrix with unique elements
- Prev by Date: Mean for non-zero elements
- Next by Date: Re: Mean for non-zero elements
- Previous by thread: Re: left adjusting the matrix with unique elements
- Next by thread: Re: left adjusting the matrix with unique elements
- Index(es):
Relevant Pages
|