統計
All
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