![photo](/responsive_image/150/150/0/0/0/cache/matlabcentral/profiles/13635749_1537607532607_DEF.jpg)
Wu Hanting
2018년부터 활동
Followers: 0 Following: 0
Feeds
답변 있음
Write a function max_product that takes v a vector and n, a positive integer, as inputs and computes the largest product of n consecutive elements of v. It returns the product and the index of the element of v that is the first term of the product.
Besides, I think u are supposed to delete the ";" behind the "product = 0" and "ind = -1", or when testing condition of length(v...
Write a function max_product that takes v a vector and n, a positive integer, as inputs and computes the largest product of n consecutive elements of v. It returns the product and the index of the element of v that is the first term of the product.
Besides, I think u are supposed to delete the ";" behind the "product = 0" and "ind = -1", or when testing condition of length(v...
6년 초과 전 | 0