Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » Software » comp.soft-sys.matlab

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Galam Lee

Posts: 12
Registered: 3/28/12
Re: Separating numbers in a matrix
Posted: May 23, 2012 5:09 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"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


Thank you for your reply :)
It's so simple method.
Also, matrix A does not contain negative and non-integer numbers, so it's not problem.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.