AYUSH MISHRA
Followers: 0 Following: 0
Statistiques
0 Questions
7 Réponses
RANG
17 649
of 295 068
RÉPUTATION
2
CONTRIBUTIONS
0 Questions
7 Réponses
ACCEPTATION DE VOS RÉPONSES
0.00%
VOTES REÇUS
1
RANG
of 20 171
RÉPUTATION
N/A
CLASSEMENT MOYEN
0.00
CONTRIBUTIONS
0 Fichier
TÉLÉCHARGEMENTS
0
ALL TIME TÉLÉCHARGEMENTS
0
RANG
of 153 155
CONTRIBUTIONS
0 Problèmes
0 Solutions
SCORE
0
NOMBRE DE BADGES
0
CONTRIBUTIONS
0 Publications
CONTRIBUTIONS
0 Public Chaîne
CLASSEMENT MOYEN
CONTRIBUTIONS
0 Point fort
NOMBRE MOYEN DE LIKES
Feeds
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; ...
plus de 4 ans il y a | 0
Write a function called halfsum that takes as input an at most two-dimensional array A and computes the sum of the elements of A that are in the lower right triangular part of A
function summa=halfsum(A) [m,n]=size(A); summa=0; for i =1:m fprintf('active row :%d \n',i); fo...
plus de 4 ans il y a | 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
function too_young =under_age(age,limit) if nargin <2 limit=21; end if age<limit too_young=true; else too_you...
plus de 4 ans il y a | 0
Write a function called picker that takes three input arguments called condition, in1 and in2 in this order. The argument condition is a logical. If it is true, the function assigns the value of in1 to the output argument out, otherwise, it assigns
function out=picker(condition,in1,in2) if condition==true out=in1; else out=in2; end SOLUTION : picker(tru...
plus de 4 ans il y a | 0
Area of a triangle
function area=tri_area(b,h,n) area=0.5*b*h*n; end %Here b=base of triangle , h=height of triangle , n=number of triangl...
plus de 4 ans il y a | 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=max(M')-min(M'); mmm=max(max(M'))-min(min(M')); end % here M' is use because when ...
plus de 4 ans il y a | 0
Calculate taxi fare by giving multiple inputs and single output
function fare= taxi_fare(d,t) d=ceil(d); %d=total distance cover by taxi t=ceil(t); %t=total time taken to complete...
plus de 4 ans il y a | 1