# AYUSH MISHRA

Followers: 0 Following: 0

**Statistics**

**MATLAB Answers**

**0** Questions

**7** Answers

RANK**22,053**

of 291,612

REPUTATION**2**

CONTRIBUTIONS

**0** Questions

**7** Answers

ANSWER ACCEPTANCE **
0.00%
**

VOTES RECEIVED**1**

RANK

of 19,806

REPUTATION**N/A**

AVERAGE RATING**0.00**

CONTRIBUTIONS**0** Files

DOWNLOADS **0**

ALL TIME DOWNLOADS**0**

RANK

of 146,393

CONTRIBUTIONS

**0** Problems

**0** Solutions

SCORE**0**

NUMBER OF BADGES**0**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF 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; ...

4 years ago | 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...

4 years ago | 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...

4 years ago | 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...

4 years ago | 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...

4 years ago | 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 ...

4 years ago | 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...

4 years ago | 1