I am trying to smooth this plot in order to look like the the second attached plot. Can anyone guide me through to do so? Thank you very much in advance. { [data,T,vT]=xlsread('Yellow_Stress vs Time.xlsx')
Time = data(:,1) Stress = data(:,4)
title('Stress Relaxation Response Yellow Sample') xlabel('Time (sec)') ylabel('Stress (Pa)')
plot(Time, Stress) }
Which should look like this:

 Réponse acceptée

Image Analyst
Image Analyst le 19 Fév 2017

0 votes

Have you simply tried conv?
windowWidth = 51; % Make a higher odd number for more smoothing.
kernel = ones(1, windowWidth)/windowWidth;
smoothedStress = conv(Stress, kernel, 'same');

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by