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

Compute scatterplot and plot linear fit together with Rho and R-squared
67 téléchargements
Mise à jour 23 août 2017

Afficher la licence

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).

Citation pour cette source

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. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2009a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Scatter Plots dans Help Center et MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Publié le Notes de version
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