Data

The (statistical) data to plot

MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

Value Summary

MandatoryList of arithmetical expressions

Description

Data is used internally to store the statistical data displayed, for example, in a pie-chart diagram. While it is possible to manipulate this data (as shown in Example 2), Data is mostly seen as a storage space irrelevant to the user.

For speed and clarity, Data will be displayed in the object inspector only if the amount of data is small. This may cause problems when using the “recalculate” feature. In such a case, the remedy is to assign the plot object in question to an identifier before plotting.

Examples

Example 1

All object types listed above store the data given in Data:

X := stats::normalRandom(0, 1):
h := plot::Histogram2d([X() $ i = 1..30])

h::Data

Example 2

It is possible to change the data in an object using Data:

p := plot::Piechart2d([1, 2, 3, 4]):
plot(p)

p::Data := [1, 1, 3, 2, 3]:
plot(p)

See Also

MuPAD Functions