How to call the function BlandAltman as an array

조회 수: 2 (최근 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 CenterFile Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by