The Math Forum

Search All of the Math Forum:

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

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

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

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: 323
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. :)


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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.