matlab循环语句,结果只存储了最后一个的值,前面的都为0,要怎么解决??? 10
pit=[];forj=2:k;ifA(j)<=A(j-1)&A(j+1)>=A(j);[x,y]=find(A==A(j));%求出A(j)的坐标pit(i)=fs/y...
pit=[];
for j=2:k;
if A(j)<=A(j-1)&A(j+1)>=A(j);
[x,y]=find(A==A(j));%求出A(j)的坐标
pit(i)=fs/y
break;
else
j=j+1;
end
end 展开
for j=2:k;
if A(j)<=A(j-1)&A(j+1)>=A(j);
[x,y]=find(A==A(j));%求出A(j)的坐标
pit(i)=fs/y
break;
else
j=j+1;
end
end 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询