|
From: | Nicholas Jankowski |
Subject: | Re: find array maximun in matrix |
Date: | Mon, 13 May 2019 14:08:00 -0400 |
hi, look that:
a=[4 6 1 6 7 9 1 2 3 4]
i want to find maximun series in matrix:
ans: [4 6 6 6 7 9 9 9 9 9]
i can to do this:
maxx=a(1);
for i=2:length(a)
if a(i)>maxx(i-1)
maxx(end+1)=a(i);
endif
end
but I wanted to write a faster code avoiding the cycle
[Prev in Thread] | Current Thread | [Next in Thread] |