linfitplot(x, y, markerColor, lineColor, printRhoR2)

Compute scatterplot and plot linear fit together with Rho and R-squared
66 descargas
Actualizado 23 ago 2017

Ver licencia

call:

linfitplot(x, y, markerColor, lineColor, printRhoR2)

Given two vectors 'x' and 'y', the function compute and plot the linear fit, with the Correlation
Coefficient (Rho) between 'x' and 'y' and the Coefficient of Determination (R^2, "how much knowing
x it is possible to determine y").

Note: This function calls 'linfit.m'

INPUT

x : independent variable
y : dependent variable
markerColor : a string ('r', 'b' , 'none', ...) or [1 0 0], [0 0.5 0] ...
lineColor : a string ('r', 'b' , 'none', ...) or [1 0 0], [0 0.5 0] ...
printRhoR2 : if 1, print the Rho and R2 values

note: 'markerColor' and 'lineColor' can be left empty [].
in this case they will take the default values (black).

Citar como

Ruggero G. Bettinardi (2024). linfitplot(x, y, markerColor, lineColor, printRhoR2) (https://www.mathworks.com/matlabcentral/fileexchange/62984-linfitplot-x-y-markercolor-linecolor-printrhor2), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2009a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Scatter Plots en Help Center y MATLAB Answers.

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión
1.1.0.0

Plot transparent markers so to being able to appreciate their density.
Print Rho and R-squared rounded by 2 decimals. [optional]

1.0.0.0