How to get Data type of workspace loaded variables and how add that datatypes using script?

5 views (last 30 days)
I have a .m files in that file many variales are created and loaded in workspace also but i want to add all the datatypes as bytes. can you tell me how to do?
Like uint8 as 1byte
uint16 as 2 byte so totally 3 bytes.
Thanks in advance.

Sign in to comment.

Answers (1)

Xingwang Yong
Xingwang Yong on 13 Apr 2021
numBytes = sum([s.bytes]);

Sign in to comment.


Community Treasure Hunt

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

Start Hunting!