Community Profile

photo

AYUSH MISHRA


Last seen: 2 days ago
10 total contributions since 2020

AYUSH MISHRA's Badges

  • First Answer

View details...

Contributions in
View by

Answered
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...

2 months ago | 0

Answered
how to replace elements in top third, middle third, and bottom third of matix
function T=trio(n,m) T=randi(10*n,3*n,m); T(1:n,1:m)=1; T(n+1:2*n,1:m)=2; T(2*n+1:3*n,1:m)=3; end % in...

3 months ago | 0

Answered
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...

3 months ago | 0

Answered
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...

3 months ago | 0