Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#2 |
初级会员
注册日期: 2011-12-20
帖子: 2
声望力: 0 ![]() |
![]()
大家看一下这样写有问题么?
function [output] = find_max_position(input,max_amount) output=zeros(max_amount,1); input=abs(input); max_value=max(max(input)); sorted=sort(input,1,'descend'); i=0; for j=1:300 for k=1:300 if input(j,k)>=sorted(max_amount) && i<max_amount i = i + 1; output(i)=j+300*k; end end end end 此帖于 2011-12-21 10:27 被 hipichu777 编辑。 |
![]() |
![]() |