相关代码 |
|
>> str2double('123.45e7') ans = 1.2345e+009 >> str2double('123 + 45i') ans = 1.2300e+002 +4.5000e+001i >> str2double('3.14159') ans = 3.1416 >> str2double('2.7i - 3.14') ans = -3.1400 + 2.7000i >> str2double({'2.71' '3.1415'}) ans = 2.7100 3.1415 >> str2double('1,200.34') ans = 1.2003e+003 >>