About running matlab in linux.
显示 更早的评论
Hello, I run the same program in Windows it shows Out of memory. Type HELP MEMORY for your options. Then I run it in Linux, it runs for a while and then shows killed.
does it mean it is out of memory or something else? How to resolve it? Thanks.
采纳的回答
更多回答(1 个)
C Zeng
2012-6-26
0 个投票
7 个评论
C Zeng
2012-6-26
Walter Roberson
2012-6-26
'single' is a 32 bit floating point number; it has lower range and lower precision than double precision.
class() of the variable will show the precision.
For me, class(1.5*ones(2,3,'single')) shows single. The result might have been different in earlier versions.
You need to be careful when you combine expressions with mixed data types: sometimes MATLAB will adjust expand the expression to double precision and sometimes MATLAB will narrow down to integer. For example [pi 8.3 uint8(11)] will be uint8
C Zeng
2012-6-27
Walter Roberson
2012-6-27
It is not possible for a numeric array to have different datatypes (and so different precisions.) You would need to use a cell array for that.
C Zeng
2012-6-28
C Zeng
2012-6-28
Walter Roberson
2012-6-28
cell arrays have potentially data types per entry, not per dimension.
num2cell() converts numeric arrays into cell arrays.
类别
在 帮助中心 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!