Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Separating numbers in a matrix
Replies: 6   Last Post: May 23, 2012 12:49 PM

 Messages: [ Previous | Next ]
 Galam Lee Posts: 14 Registered: 3/28/12
Re: Separating numbers in a matrix
Posted: May 23, 2012 5:09 AM

"Roger Stafford" wrote in message <jphjaq\$qf3\$1@newscl01ah.mathworks.com>...
> "Galam Lee" wrote in message <jphf3r\$9no\$1@newscl01ah.mathworks.com>...
> > A=[45 50; 200 205; 355 433]
> >
> > I would like to separate the numbers from the matrix and make two new matrixes which contain 2-digit numbers.
> > eg) A1=[45 50 ;00 05; 55 33]
> > A2=[00 00; 02 02; 03 04]

> - - - - - - - - - - -
> Are these 'double' quantities or strings? If they are double, do this:
>
> A1 = mod(A,100);
> A2 = (A-A1)/100;
>
> I don't know how you want to handle A if it contains negative numbers or non-integers.
>
> Roger Stafford

It's so simple method.
Also, matrix A does not contain negative and non-integer numbers, so it's not problem.

Date Subject Author
5/22/12 Galam Lee
5/22/12 ImageAnalyst
5/22/12 Nasser Abbasi
5/23/12 Galam Lee
5/22/12 Roger Stafford
5/23/12 Galam Lee
5/23/12 ImageAnalyst