matlab 用num2str函数如何保留小数点后10位

问题描述:

matlab 用num2str函数如何保留小数点后10位
C是矩阵两列30.235909116700000, 30.235909116700000.我想实现转换为str型,但是用
C = num2str( C );函数后 C只能保留矩阵小数点后四位,数据失真.请问怎么能保留后十位?
1个回答 分类:综合 2014-10-29

问题解答:

我来补答
% str = num2str(a, precision) converts the array A into a string
% representation str with maximum precision specified by precision.
% Argument precision specifies the number of digits the output string
% is to contain. The default is four.
>> num2str(C,12)
ans =
30.2359091167 30.2359091167
 
 
展开全文阅读
剩余:2000
上一页:求形状的题不会