How to call the function BlandAltman as an array

5 ビュー (過去 30 日間)
David De Querol
David De Querol 2022 年 7 月 2 日
編集済み: Rik 2022 年 7 月 2 日
The following function helps to run the Bland Altman Correlation plots:
function [array] = BACorrelation(RR_loc_ref, RR_ref, RR_loc, RR)
...
BlandAltman(RR_ref,RR_matched)
end
Now, how can I store the function into an array, so that I can overlap many different correlation plots in a single figure?.
function [array] = BACorrelation(RR_ref, RR_matched)
array = [];
array = BlandAltman(RR_ref,RR_matched);
end
that one can therefore call from the main function:
function main
[array] = BlandAltman(RR_ref,RR_matched);
figure
hold on;
for i=1:length(array)
figure
plot(array{i})
end
hold off;
end
}
Greetings,
Dav
  1 件のコメント
Jan
Jan 2022 年 7 月 2 日
As far as I can see, BlandAltman is not a function of Matlab's toolboxes. We cannot guess, which function you use, so please mention this explicitly.
You can neither "call a function as array" or "store a function in an array", but if the function can handle arrays as inputs, it might reply an array as output. Does the help section of this function explain its inputs and outputs?

サインインしてコメントする。

回答 (1 件)

Rik
Rik 2022 年 7 月 2 日
編集済み: Rik 2022 年 7 月 2 日
You can use my BlandAltmanPlot function and use the GroupIndex paramater to plot several point on a single graph.
var1=[494,395,516,434,476,557,413,442,650,433,417,656,267,478,178,423,427];
var2=[512,430,520,428,500,600,364,380,658,445,432,626,260,477,259,350,451];
grouping=[ones(1,8) 2*ones(1,9)];
h=BlandAltmanPlot(var1,var2,'GroupIndex',grouping);
% Change the appearance of all markers:
set(h.plot.data,'Marker','*')
% Change the appearance of the markers for a subgroup:
set(h.plot.data(1),'Color','r','Marker','o')
% Change a property of the axes:
ax=get(h.plot.data(1),'Parent');
set(ax,'YTick',-100:50:100)

カテゴリ

Help Center および File ExchangeLanguage Fundamentals についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by