How to do a baseline correction
113 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Faezeh Manesh
el 25 de Sept. de 2019
Comentada: Hassan Nawazish
el 29 de Jun. de 2020
Hello everyone,
I have an experimental data as shown in the figure, I need to do a baseline correction, in a way that the black line that I drew in the picture becomes horizental. Can any of you help me to do it in MATLAB?![DSCdata1.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/239773/DSCdata1.png)
![DSCdata1.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/239773/DSCdata1.png)
1 comentario
David Hill
el 25 de Sept. de 2019
Looks like you know how exactly how the baseline needs to be adjusted. Just subtract the linear adjustment from your power array.
Respuesta aceptada
Rik
el 25 de Sept. de 2019
You mean like a simple subtraction?
t=linspace(0,10,100);
bias=@(t) t/9;
P_fun=@(t) 0.1*(t-3).^2+sin(t/2)-0.85 +bias(t);
P=P_fun(t);
%subtract bias
P_new=P-bias(t);
plot(t,P,'b',t,bias(t),'k',t,P_new,'r')
1 comentario
Hassan Nawazish
el 29 de Jun. de 2020
plot(ta,zeros(size(ta)),'r.-')
try this after plot command for your plot here ta is xaxis variable and you will get a horizontal baseline.'r' is representing the color.
Más respuestas (0)
Ver también
Categorías
Más información sobre Line Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!