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

4 Ansichten (letzte 30 Tage)
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.
  6 Kommentare

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Xingwang Yong
Xingwang Yong am 13 Apr. 2021
s=whos;
numBytes = sum([s.bytes]);
  14 Kommentare

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Data Import and Network Parameters finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by