Feeds
답변 있음
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.
function [summa,index] = max_sum(v,n) l=length(v);m=0;t=0;pointer=1;index=0; %When n is larger than the length of vector v i...
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.
function [summa,index] = max_sum(v,n) l=length(v);m=0;t=0;pointer=1;index=0; %When n is larger than the length of vector v i...
거의 4년 전 | 1
문제를 풀었습니다
Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...
4년 초과 전
문제를 풀었습니다
Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...
4년 초과 전
질문
Write a function called minimax that takes M, a matrix input argument and returns mmr, a row vector containing the absolute values of the difference between the maximum and minimum valued elements in each row. As a second output argument called mmm,
Write a function called minimax that takes M, a matrix input argument and returns mmr, a row vector containing the absolute valu...
4년 초과 전 | 답변 수: 17 | 2