Mercurial > hg > ltpda
comparison m-toolbox/classes/+utils/@xml/num2str.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 % NUM2STR uses sprintf to convert a data vector to a string with a fixed precision. | |
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3 % | |
4 % DESCRIPTION: uses sprintf to convert a data vector to a string with a | |
5 % fixed precision. | |
6 % | |
7 % CALL: str = num2str(number); | |
8 % | |
9 % VERSION: $Id: num2str.m,v 1.2 2010/09/28 17:47:15 ingo Exp $ | |
10 % | |
11 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
12 | |
13 function str = num2str(number) | |
14 str = sprintf('%.17g ', number); | |
15 end | |
16 |