class_()
Environment
class_() is a MATLAB®-compatible environment function for return the class/type of a value as a string. returns 'double' for plain numbers/arrays, 'char' for strings, 'logical' for booleans, 'cell' for cell arrays, 'struct' for plain objects, or the typed-numeric kind ('int8', 'uint16', 'single', etc.) for typed values. also returns system types ('tf', 'ss', 'zpk') for control objects, 'containers.map' for maps, and 'table' for tables. Run it online in your browser with SimLab — free, no install, no license required.
Return the class/type of a value as a string. Returns 'double' for plain numbers/arrays, 'char' for strings, 'logical' for booleans, 'cell' for cell arrays, 'struct' for plain objects, or the typed-numeric kind ('int8', 'uint16', 'single', etc.) for typed values. Also returns system types ('tf', 'ss', 'zpk') for control objects, 'containers.Map' for maps, and 'table' for tables.
Syntax
class(x)
Examples — run class_() in your browser
See Also
Frequently Asked Questions about class_()
Is the class_() function free to use in SimLab?
Yes. SimLab is 100% free — no signup, no license, and no usage limits. You can run class_() and 510+ other MATLAB®-compatible functions directly in your browser at simulations4all.com/simlab.
Do I need to install MATLAB to use class_()?
No. SimLab runs entirely in your web browser with zero installation. The class_() function works without any MATLAB® license or software download.
What does class_() do?
Return the class/type of a value as a string. Returns 'double' for plain numbers/arrays, 'char' for strings, 'logical' for booleans, 'cell' for cell arrays, 'struct' for plain objects, or the typed-numeric kind ('int8', 'uint16', 'single', etc.) for typed values. Also returns system types ('tf', 'ss', 'zpk') for control objects, 'containers.Map' for maps, and 'table' for tables. It is a MATLAB®-compatible environment function available in SimLab with the same calling syntax as MATLAB® — typically: class(x).
Can I run class_() in my browser?
Yes. Open SimLab at simulations4all.com/simlab, write or paste code that calls class_(), and run it. Execution happens locally in your browser — no data leaves your machine.
Try SimLab — MATLAB®-compatible, free, in your browser
510+ functions. Runs in your browser. No install. No license.
Open SimLabMATLAB® is a registered trademark of The MathWorks, Inc. SimLab is an independent project by Simulations4All and is not affiliated with, endorsed by, or sponsored by The MathWorks, Inc.