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!