Direct computation with Table
Description
You can perform calculations directly on tableswithout needing to index into them.
To perform such operations using the same syntax as you would for arrays, your tables must meet several criteria:
All variables within the table must have data types that support the intended calculations (e.g., numeric or logical types).
When performing an operation where only one operand is a table, the other operand must be either a numeric or logical array.
For operations involving two tables, they must have compatible sizes (i.e., the same number of rows and columns or the operation must make sense for the structures involved).
Below is an example that demonstrates how to perform calculations without explicitly indexing into the table.
Example
Direct computation on Tables
See also
abs, acos, acosh, acot, acotd, acoth, acsc, acscd, acsch, asec, asecd, asech, asin, asind, asinh, atan, atand, atanh, ceil, cosd, cosh, cospi, cot, cotd, coth, csc, cscd, csch, exp, fix, floor, log, log10, log1p, log2, nextpow2, round, sec, secd, sech, sin, sind, sinh, sinpi, sqrt, tan, tand, tanh, var, acosd, not, plus, minus, times, eq, ge, gt, le, ne, lt, mrdivide, rem, power, pow2, or, mod, ldivide.
History
1.9.0
initial version
Author
Allan CORNET
Last updated