Main Content

Display Statistics in the Workspace Browser

For each variable or object, the Workspace browser can display statistics such as theMin,Max, andMean, when relevant. MATLAB®performs these calculations using themin,max, andmeanfunctions, and updates the results automatically.

To display statistics, on the Workspace browser title bar, click theShow Workspace Actionsbutton, and then selectChoose Columns. Select the statistics you want MATLAB to calculate. InMATLAB Online™, to select which columns to display, right-click a column name in the Workspace browser and select or clear the desired column names.

提高工作空间浏览器性能ormance During Statistical Calculations

If you show statistical columns in the Workspace browser, and you work with very large arrays, you might experience performance issues when the data changes as MATLAB updates the statistical results. To improve performance, consider one or both of the following:

  • Show only the statistics of interest to you.

    On the Workspace browser title bar, click theShow Workspace Actionsbutton, and then selectChoose Columns. Clear the statistics that you do not want MATLAB to calculate. InMATLAB Online, to change which statistics display, right-click a column name in the Workspace browser and clear the statistics that you do not want MATLAB to calculate.

  • Exclude large arrays from statistical calculations.

    On theHometab, in theEnvironmentsection, click the指定的偏好button. SelectMATLAB>Workspace, and then use the arrow buttons underStatistical calculationsto change the maximum array size for which the Workspace browser performs statistical calculations. Any variable exceeding the maximum array size reportsin Workspace browser statistics columns instead of statistical results.

    Changing Workspace preferences is not supported inMATLAB Online.

Include or Exclude NaN Values in Statistical Calculations

If your data includesNaNs (Not-a-Number values), you can specify that the Workspace browser statistical calculations consider or ignore theNaNs. On theHometab, in theEnvironmentsection, click the指定的偏好button. SelectMATLAB>Workspace, and then select one of the following:

  • Use NaNs when calculating statistics

    If a variable includes aNaN, and you select this option, the values forMin,Max,Var, and several other statistics appear asNaN. However,Modeand several other statistics show a numeric result.

  • Ignore NaNs whenever possible

    If a variable includes aNaN, and you select this option, numeric results appear for most statistics includingMin,Max, andMode. However,Varstill appears asNaN.

Changing Workspace preferences is not supported inMATLAB Online.

Related Topics