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: mxCreateNumericArray maximal array size
Replies: 8   Last Post: Jun 6, 2012 10:16 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
shlomi golubev

Posts: 4
Registered: 5/14/12
Re: mxCreateNumericArray maximal array size
Posted: Jun 6, 2012 7:07 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Steven_Lord" <slord@mathworks.com> wrote in message <jpg77r$cqn$1@newscl01ah.mathworks.com>...
>
>
> Don't use int _or_ long. Use mwSize and/or mwIndex and let the compiler
> figure it out for you.
>
> http://www.mathworks.com/help/techdoc/apiref/mwsize.html
>
> http://www.mathworks.com/help/techdoc/apiref/mwindex.html
>
>
> http://www.mathworks.com/help/techdoc/matlab_external/brb25_6-1.html
>
> --
> Steve Lord
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com


How can it be done during compile time? the array size depends on user input, if the input is less than 2^31 a simple int would do the job but if the input is more than that I'll need to use long type for index to avoid overflow, in any case this decision can be made only during runtime after the user input was received, am I missing something?



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.