Mean and Standard Deviation Calculator for MATLAB

Version 1.0.1 (1,54 KB) von Hassaan
Calculate mean and standard deviation of a dataset.
3 Downloads
Aktualisiert 16. Jan 2024

Lizenz anzeigen

% Note:
This function does not handle missing values (NaNs). It treats NaNs as regular numbers, which can affect the accuracy of the mean and standard deviation calculations.
% Example Usage of dataStatistics Function
% Creating a sample data matrix
sampleData = [1, 2, 3; 4, 5, 6; 7, 8, 9];
% Calling the dataStatistics function
[meanValue, stdValue] = dataStatistics(sampleData);
% Displaying the results
fprintf('The mean of the sample data is: %f\n', meanValue);
fprintf('The standard deviation of the sample data is: %f\n', stdValue);

Zitieren als

Hassaan (2024). Mean and Standard Deviation Calculator for MATLAB (https://www.mathworks.com/matlabcentral/fileexchange/157791-mean-and-standard-deviation-calculator-for-matlab), MATLAB Central File Exchange. Abgerufen.

Kompatibilität der MATLAB-Version
Erstellt mit R2020a
Kompatibel mit R2020b und späteren Versionen
Plattform-Kompatibilität
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.1

Added example usage.

1.0.0