data-types
Programming
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
See Also
Try SimLab — Free MATLAB® Alternative
466 functions. Runs in your browser. No install.
Open SimLab