how can i change data type of any variable
17 次查看(过去 30 天)
显示 更早的评论
how can i change data type of any variable. i am using R2012a matlab. because by default its taking every value as a decimal.
1 个评论
回答(1 个)
Jan
2017-3-29
The default type used by Matlab is double (not "decimal"). You cannot change the default type, but you can easily specify a different type for a variable:
a = uint8(17)
But with
b = 17
the type of b is double.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!