Sritama Mitra
Followers: 0 Following: 0
Feeds
已回答
Find the first element that satisfy a condition in a vector
function [summa,index]=max_sum(v,n) k=length(v); index=ones(1,1); if n<=k for i=1:(k-n+1) b=sum(v(i:i+n-1)); ...
Find the first element that satisfy a condition in a vector
function [summa,index]=max_sum(v,n) k=length(v); index=ones(1,1); if n<=k for i=1:(k-n+1) b=sum(v(i:i+n-1)); ...
4 years 前 | 0