转换数字格式 [英] Converting Number format
本文介绍了转换数字格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
e是什么意思?如何将这些数字转换为int?
这是矩阵x = [x1,x2,x3,x4,x5,x6,x7,x8]的答案
ans =
1.0e + 004 *
-0.0000
-0.6340
-0.3660
-0.8966
0.6340
1.0000
-0.7321
0.6340
解决方案 1.0e + 004
表示 1.0 * 10 ^ 4
。
使用int32(x)进行工作,根据您的目标精度,还可以使用int16(x)或int64(x)。查看文档 http://www.mathworks.de/help/techdoc/ref /int32.html
舍入也完成了。
I have problem understanding the numbers produced by Matlab.
What does the e mean? And how can i convert those numbers to int?
This is the answer for a matrix x=[x1, x2,x3,x4,x5,x6,x7,x8]
ans =
1.0e+004 *
-0.0000
-0.6340
-0.3660
-0.8966
0.6340
1.0000
-0.7321
0.6340
解决方案 The 1.0e+004
means 1.0*10^4
.
Casting works using int32(x), depending on your target accuracy you can also use int16(x) or int64(x). Check out the documentation http://www.mathworks.de/help/techdoc/ref/int32.html
Rounding is also done.
这篇关于转换数字格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文