How to understand the Memory [Maximum posible Array] result ?
이전 댓글 표시
Hello, Please could someone help me knowing more about the topic below ?
Function Memory(), output Maximum Posible Array: It is said on the description page ”To see how many array elements this number represents, divide by the number of bytes in the array class. For example, for a double array, divide by 8. The actual number of elements MATLAB can create is always fewer than this number.” How do we know the “number of bytes in the array class” ? For example, for a multiple dimensional matrix 3x3x3, how many bytes consume each cell (type floating and integer values)?
Thank you in advance for your help, hoping you're having a good day. Eric
채택된 답변
추가 답변 (1개)
Guillaume
2018년 6월 25일
0 개 추천
As per the documentation you've quoted each element of a double array uses 8 bytes. So a 3x3x3 double array would be 27x8 = 216 bytes. The same array of type single, which uses 4 bytes per elements would be 27x4 = 108 bytes.
An array of type int64 or uint64 also uses 8 bytes per element. Type int32 or uint32 is 4 bytes, *int16 half of that and *int8 only 1 byte.
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!