Muhammad
Followers: 0 Following: 0
Feeds
已回答
caesar cyphor encryption problem .
%Help required function coded = caesar(X,Y) X=char(X); code=double(X)+Y; if code>=126 code=code-95; coded=fprintf(...
caesar cyphor encryption problem .
%Help required function coded = caesar(X,Y) X=char(X); code=double(X)+Y; if code>=126 code=code-95; coded=fprintf(...
2 years 前 | 0
已回答
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) Z=length(v); summ=(1:Z-n+1); if n>Z summa=0; index=-1; return; else ...
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) Z=length(v); summ=(1:Z-n+1); if n>Z summa=0; index=-1; return; else ...
2 years 前 | 0
已回答
Write a function called valid_date that takes three positive integer scalar inputs year, month, day. If these three represent a valid date, return a logical true, otherwise false. The name of the output argument is valid.
function valid =valid_date(year,month,day) if isscalar(year)&&isscalar(month)&&isscalar(day)&& (isinteger((year/4)==0) || ~is...
Write a function called valid_date that takes three positive integer scalar inputs year, month, day. If these three represent a valid date, return a logical true, otherwise false. The name of the output argument is valid.
function valid =valid_date(year,month,day) if isscalar(year)&&isscalar(month)&&isscalar(day)&& (isinteger((year/4)==0) || ~is...
2 years 前 | 0
已回答
Write a function called under_age that takes two positive integer scalar arguments: age that represents someone's age, and limit that represents an age limit. The function returns true if the person is younger than the age limit. If the second arg
%Help required Error showing=Output argument "x" (and possibly others) not assigned a value in the execution with "under_age" f...
Write a function called under_age that takes two positive integer scalar arguments: age that represents someone's age, and limit that represents an age limit. The function returns true if the person is younger than the age limit. If the second arg
%Help required Error showing=Output argument "x" (and possibly others) not assigned a value in the execution with "under_age" f...
2 years 前 | 0
已回答
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,
function [mmr,mmm]=minimax(M) mmr=[abs([max(M.')-min(M.')])] mmm=abs([(max(M(:))-(min(M(:)))]) end
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,
function [mmr,mmm]=minimax(M) mmr=[abs([max(M.')-min(M.')])] mmm=abs([(max(M(:))-(min(M(:)))]) end
2 years 前 | 0