how to connect two function

조회 수: 2 (최근 30일)
muhammad ismat
muhammad ismat 2016년 5월 3일
댓글: per isakson 2016년 5월 3일
in my code LSC i calculate matrix(s) that send to function Accuracy
so i want to make loop to variable (r) in LSC function this make number of matrix (s) as an output that should to send to function Accuracy so
how to make for loop i function LSC and send it output to function Accuracy
LSC function
[label,s] = LSC(data,k)
p = 7;
r = 3;
.
.
U(:,1) = [];
[label,s] = kmedo(U',k);
end
Accuracy fun
Accuracy=yarbb(data,x)
for i=1:100
rng('default')
[label,s] = LSC(adj,x);
coordinates=data;
Av=[coordinates; fliplr(coordinates)];
linindices = sub2ind(size(s), Av(:, 1), Av(:, 2))';
remain=setdiff(1:numel(s), linindices);
sim=s(remain);
similarity=unique(sim);
b = similarity(similarity~=0);
auc= (ndash + 0.5 * nddash)/(ndash+nddash+nn);
Accuracy = mean(auc)
end
  댓글 수: 3
muhammad ismat
muhammad ismat 2016년 5월 3일
i don't understand what do you mean in second line in your comment
per isakson
per isakson 2016년 5월 3일
My guess. IA says: Replace
Accuracy=yarbb(data,x)
by
function Accuracy=yarbb(data,x)

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Axis Labels에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by