About running matlab in linux.
Afficher commentaires plus anciens
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.
Réponse acceptée
Plus de réponses (1)
C Zeng
le 26 Juin 2012
0 votes
7 commentaires
C Zeng
le 26 Juin 2012
Walter Roberson
le 26 Juin 2012
'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
le 27 Juin 2012
Walter Roberson
le 27 Juin 2012
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
le 28 Juin 2012
C Zeng
le 28 Juin 2012
Walter Roberson
le 28 Juin 2012
cell arrays have potentially data types per entry, not per dimension.
num2cell() converts numeric arrays into cell arrays.
Catégories
En savoir plus sur Data Type Conversion dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!