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: How do you get Matlab to recognize 1000 digit numbers without
Replies: 2   Last Post: Feb 21, 2013 9:52 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Christopher Creutzig

Posts: 285
Registered: 2/24/09
Re: How do you get Matlab to recognize 1000 digit numbers without
Posted: Feb 21, 2013 8:24 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 06.01.13 08:20, Allen wrote:

> The problem gives you a specific number, so I would have to enter in a commas between every digit which for obvious reason would be very tedious...

>> str2num('1234567890'.').'

ans =

1 2 3 4 5 6 7 8 9 0

That easily works for an arbitrarily long positive integer number given
as a string. Working out why is left as an exercise to the reader. :)


Christopher




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.