Feeds
提问
Counting characters in a file
Hello, I am doing an online course on matlab in coursera and I have come a cross a problem that seems hard for me to solve. ...
5 years 前 | 4 个回答 | 0
4
个回答已回答
Write a function called max_sum that takes v, a row vector of numbers, and n, a positive integer as inputs. The function needs to find the n consecutive elements of v whose sum is the largest possible.
function [summa,index] = max_sum(v,n) if n>length(v) summa = 0; index = -1; return end ...
Write a function called max_sum that takes v, a row vector of numbers, and n, a positive integer as inputs. The function needs to find the n consecutive elements of v whose sum is the largest possible.
function [summa,index] = max_sum(v,n) if n>length(v) summa = 0; index = -1; return end ...
5 years 前 | 0
提问
Trying to modify a vector by removing alternate elements
Hi , I am learning matlab and I came across a problem on cody: I need to be able to remove even elements from a 1D vector: i...
5 years 前 | 1 个回答 | 0