Shorten code for a function
显示 更早的评论
Hi
Please I have this function
fnP=@(a,i)(sum(a(i)>a(1:i))+0.5*sum(a(i)==a(1:i)))/i;
and I get generated result for each column
for instance
m1 = fnP(result, 1)
m2 = fnP(result, 2)
m3 = fnP(result, 3)
.
.
.
mn =fnP(result, n)
and so on
I will like a short code that will give me the m results without having to repeat m1, m2, m3 , m4... etc the code for 800 column datapoint
Thanks in advance
Tino
1 个评论
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Elementary Math 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!