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: Memory leak in num2str(integer Array, '%d')
Replies: 4   Last Post: Feb 14, 2013 2:04 PM

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: Memory leak in num2str(integer Array, '%d')
Posted: Feb 14, 2013 4:41 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 14.02.13 03:30, Andrew wrote:

> But the size is exactly twice what I expected, since I thought char was 1 byte, but it is apparently two bytes.

The character type in MATLAB is not what char is in C/C++, but a 16 bit
type (for Unicode strings), correct. Functions like fopen have a
parameter (which the documentation simply calls ?encoding?) to choose
the encoding in which to read and write such strings from external
files; for the UI, the encoding is determined by your language/locale


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.