How can i convert the first image(Red) like the second one(Black)?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
siet ece
el 1 de Ag. de 2021
Comentada: siet ece
el 2 de Ag. de 2021
2 comentarios
Rik
el 1 de Ag. de 2021
You want to fit a certain function to your data. What have you tried so far?
Respuesta aceptada
Image Analyst
el 1 de Ag. de 2021
Use plot() instead of stem().
5 comentarios
Image Analyst
el 2 de Ag. de 2021
The black curve in your original post doesn't look smooth to me. But anyway, you can smooth the data and then plot the smoothed data with a sliding polynomial fit filter, sgolayfilt() in the Signal Processing Toolbox.
polynomialOrder = 2; % Larger for less smoothing.
windowWidth = 7; % Larger for more smoothing.
smoothedSignal = sgolayfilt(signal, polynomialOrder, windowWidth);
plot(smoothedSignal, 'b-', 'LineWidth', 3);
grid on;
title('Smoothed Signal', 'FontSize', 20);
If you don't have sgolayfilt(), try movmean().
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!