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:

 Accepted Answer

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');

More Answers (0)

Categories

Find more on Stress and Strain in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!