If the signal is a DC voltage, simply use std() to take the standard deviation. If the power supply supplies an AC voltage (sine wave), fit the signal to a cubic with sgolayfilt() - a Savitzky-Golay filter which is like a sliding polynomial filter - and then subtract the fitted signal from the actual signal to get the noise. You know that sine and cosine waves can be modeled as polynomials from the Taylor series expansion, so I'd go no higher than 3rd or 4th order on the Savitzky-Golay filter. sgolayfilt() is in the signal Processing Toolbox and I attach a demo. If you don't have that toolbox you can use rloess or rsmooth in the Curve Fitting Toolbox.
clc; % Clear the command window. close all; % Close all figures (except those of imtool.) clear; % Erase all existing variables. Or clearvars if you want. workspace; % Make sure the workspace panel is showing. format long g; format compact; fontSize = 25; % Make a noisy sine wave signal x = 1 : 300; period = 50 y = sin(2*pi*x/period); noiseAmplitude = 0.8; y = y + noiseAmplitude * rand(size(y)); subplot(2,1,1); plot(x, y, 'b-', 'LineWidth', 2); grid on; title('Noisy Signal', 'FontSize', fontSize); % Enlarge figure to full screen. set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0 1 1]); % Give a name to the title bar. set(gcf, 'Name', 'Demo by ImageAnalyst', 'NumberTitle', 'Off') % Now smooth with a Savitzky-Golay sliding polynomial filter windowWidth = 27 polynomialOrder = 3 smoothY = sgolayfilt(y, polynomialOrder, windowWidth); subplot(2,1,2); plot(x, smoothY, 'b-', 'LineWidth', 2); grid on; title('Smoothed Signal', 'FontSize', fontSize);
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.