Community Profile

photo

Ali Mohammadi


Last seen: plus de 2 ans il y a Actif depuis 2021

Statistiques

  • First Answer

Afficher les badges

Content Feed

Afficher par

A répondu
Write a function max_sum that takes v a row vector of numbers & n,a positive integer as inputs.The function needs to find n consecutive elements of v whose sum is largest possible.It returns summa & index of first element of n consecutive integers.
and this is my solution for it: function [summa, index] = max_sum(v, n) %creat an empty vector for cunsecutive sums, and ultim...

plus de 2 ans il y a | 1