matlab code to find mean, median and standard deviation of a series of data in discrete time wavelet
11 views (last 30 days)
Show older comments
what is the matlab code to find mean, median and standard deviation of a series of data in discrete time wavelet platform. This data is phase currents in a machine.This is either in time series formate or in stuctured with time .
0 Comments
Answers (1)
Ayush
on 10 Jul 2024
Hi,
To find the mean, median, and standard deviation of a series of data, you can make use of inbuilt functions "mean", "median", and "std", respectively. If your data is structured with time, such as a timetable, you can extract the relevant variable and perform the same calculations. Refer to an example implementation below:
% Sample data: phase currents in a machine with time (example data)
% Replace this with your actual data
time = datetime(2023,10,1,0,0,0):minutes(1):datetime(2023,10,1,0,9,0);
phase_currents = [1.2, 2.3, 2.1, 1.8, 2.5, 2.7, 1.9, 2.2, 2.4, 2.6]';
data = timetable(time', phase_currents);
% Extract the phase currents
currents = data.phase_currents;
% Calculate mean
mean_value = mean(currents);
% Calculate median
median_value = median(currents);
% Calculate standard deviation
std_deviation = std(currents);
% Display the results
fprintf('Mean: %.2f\n', mean_value);
fprintf('Median: %.2f\n', median_value);
fprintf('Standard Deviation: %.2f\n', std_deviation);
For more information on "mean", "median", and "std" functions, refer to the below documentations:
0 Comments
See Also
Categories
Find more on Continuous Wavelet Transforms in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!