Correlation coefficient on qq plot

13 次查看(过去 30 天)
How can i add the correlation coefficient on the qq plot at the top left?
i used corrcoef function to calculate the correlation coefficient between two arrays
  4 个评论
Hatim Altarteer
Hatim Altarteer 2020-7-6
no, the line does not represnt the correlation coefficient as this function indicates that the correlation coefficient is the red line.

请先登录,再进行评论。

回答(1 个)

Jemima Pulipati
Jemima Pulipati 2020-7-9
编辑:Jemima Pulipati 2020-7-9
From my understanding, you want to customize the plot such that data other than the legend related to plot should be added to the top left of the plot.
You can use text to add data at a specific datapoint in the figure.
The following example explains how to use text
% generating a plot and adding a legend
v = 1:5
plot(v)
lgd = legend('a');
num = 123.45
%placing a text at a specific data point in the figure
txt = "Sample Text = " + num
text(1.5, 4.5, txt)
here (1.5, 4.5) specifies the position where the text has to be placed.

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by