Plot linear regression without data points
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I have a figure with a scatter plot and I want to add a linear regression with different data. I only want to plot the regression line and not the data.
I use
mdl = fitlm(x,y);
plot(mdl)
Is there a way to exlude the data points of x and y in my plot?
Thanks a lot in advance!
0 comentarios
Respuesta aceptada
KSSV
el 1 de Abr. de 2019
x = rand(20,1) ;
y = rand(20,1) ;
mdl = fitlm(x,y);
h = plot(mdl) ;
delete(h(1))
Más respuestas (0)
Ver también
Categorías
Más información sobre Linear and Nonlinear Regression 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!