data-types()
Programming
data-types() is a MATLAB®-compatible programming function for simlab supports these data types: double — numbers and numeric arrays/matrices (default type) char — strings enclosed in single quotes complex — complex numbers (use i or j suffix, or complex(re, im)) logical — boolean values (true/false, or 1/0) cell — cell arrays that hold mixed types: {1, 'hello', [1 2]} struct — structures with named fields: struct('name', value) symbolic — symbolic math variables (declare with syms) tf/ss/zpk — control system objects (transfer function, state-space, zero-pole-gain) use class(x) to check the type of any value. Run it online in your browser with SimLab — free, no install, no license required.
SimLab supports these data types: double — Numbers and numeric arrays/matrices (default type) char — Strings enclosed in single quotes complex — Complex numbers (use i or j suffix, or complex(re, im)) logical — Boolean values (true/false, or 1/0) cell — Cell arrays that hold mixed types: {1, 'hello', [1 2]} struct — Structures with named fields: struct('name', value) symbolic — Symbolic math variables (declare with syms) tf/ss/zpk — Control system objects (transfer function, state-space, zero-pole-gain) Use class(x) to check the type of any value.
Syntax
42, 3.14, 1e-6 % numbers (double)
[1, 2; 3, 4] % matrix
'hello' % string (char array)
3 + 4i, complex(3, 4) % complex number
{1, 'a', [1 2]} % cell arraystruct('x', 1, 'y', 2) % structsyms x % symbolic variable
Examples — run data-types() in your browser
See Also
Frequently Asked Questions about data-types()
Is the data-types() function free to use in SimLab?
Yes. SimLab is 100% free — no signup, no license, and no usage limits. You can run data-types() and 510+ other MATLAB®-compatible functions directly in your browser at simulations4all.com/simlab.
Do I need to install MATLAB to use data-types()?
No. SimLab runs entirely in your web browser with zero installation. The data-types() function works without any MATLAB® license or software download.
What does data-types() do?
SimLab supports these data types: double — Numbers and numeric arrays/matrices (default type) char — Strings enclosed in single quotes complex — Complex numbers (use i or j suffix, or complex(re, im)) logical — Boolean values (true/false, or 1/0) cell — Cell arrays that hold mixed types: {1, 'hello', [1 2]} struct — Structures with named fields: struct('name', value) symbolic — Symbolic math variables (declare with syms) tf/ss/zpk — Control system objects (transfer function, state-space, zero-pole-gain) Use class(x) to check the type of any value. It is a MATLAB®-compatible programming function available in SimLab with the same calling syntax as MATLAB® — typically: 42, 3.14, 1e-6 % numbers (double).
Can I run data-types() in my browser?
Yes. Open SimLab at simulations4all.com/simlab, write or paste code that calls data-types(), 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.