when have matrix, has values written 5.34000e+5. when try create string variable, following value mat(1,1), contains 5.340000e+5, matlab creates string variable 534000. how can create string variable 5.34000e+5?
thanks
you need specify formatting while converting:
>> number = 534000 number = 534000 >> s = num2str(number,'%10.5e\n') s = 5.34000e+05 >> class(s) ans = char