Can i accomodate various sized integers together in an array like arr1=[1(1bit), 3(2bits), 6(3bits), 14(4bits), 31(5bits), 55(6bits), 121(7bits), 255(8bits)..so on..]. I want the variable should use the optimal storage by means of using variable size representations to the various elements in an array(as per requirement).

 채택된 답변

KSSV
KSSV 2021년 2월 4일
You can make them a cell....
Read about cell.
C{1} = single(pi) ;
C{2} = double(pi) ;

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Data Type Conversion에 대해 자세히 알아보기

질문:

2021년 2월 4일

댓글:

2021년 2월 9일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by