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

Compute scatterplot and plot linear fit together with Rho and R-squared
66.0 次下载
更新时间 2017/8/23

查看许可证

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

引用格式

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. 检索来源 .

MATLAB 版本兼容性
创建方式 R2009a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Scatter Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
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