Date: Feb 14, 2013 2:04 PM
Author: Bruno Luong
Subject: Re: Memory leak in num2str(integer Array, '%d')
"Andrew" wrote in message <firstname.lastname@example.org>...
> I should also note the reason I wanted to use the format option, it was A LOT faster:
> >> d=repmat(int8(10),624346,1);
> >> tic;f=num2str(d);toc
> Elapsed time is 11.023761 seconds.
> >> tic;h=num2str(d,'%d');toc
> Elapsed time is 0.861489 seconds.
If you want speed, use sprintf instead. NUM2STR has a lot of overhead.