Community Profile

# Anupam Agarwal

### Anand International College of Engineering, Jaipur

483 total contributions since 2014

Assistant Professor(EEE)

#### Anupam Agarwal's Badges

View details...

Contributions in
View by

Solved

Given a Vector v1, create v2 which is the sum of each two adjacent elements in v1. {length(v2)=length(v1)-1}
if v1 is [1 2 3 4 5 6 7 8] then v2 should be [3 5 7 9 11 13 15]. if v1 is [1; 3; 5; 7] the...

6 Monate ago

Solved

Given a matrix A (size m x n) create a matrix B (size m+2 x n+2) which consists of matrix A surrounded by zeros. See Example below:
A = [1 2 3 4 5 6] ----------- B = [0 0 0 0 0 0 1 2 3 0 0 4 5 6 0 0 0 0 0 0]

6 Monate ago

Solved

Given a matrix A (size m x n) create a matrix B which consists of matrix A sorted in descending order by columns and then by rows.
--------------- A= [ 2 6 -3 7 12 0 -12 5 1] --------------- B= [12 7 1 6 2 0 5 -3 ...

6 Monate ago

Solved

Rearrange the given matrix to have all its zeros climb up to the top of each column - using for loops.
Given a matrix x, *using loops only* return a matrix y, in which all the zeros have "climbed" up to the top. That is, any zeros ...

6 Monate ago

Solved

Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

6 Monate ago

Solved

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

6 Monate ago

Solved

Given a matrix A return a vector of the product of the elements in each column using a loop without using prod.
--------------------- for m: 3 1 3 3 10 1 9 1 9 4 1 4 5 6 5 ...

8 Monate ago

Solved

Ratio between sum of primer numbers and non-prime numbers
Write a function that calculates the ratio between the sum of the prime numbers lower or equal than x, and the sum of the non-pr...

9 Monate ago

Solved

Ratio between sum of primes and sum of factors
Write a function that calculates the ratio between the sum of primes numbers lower or equal to x, and the sum of the factors of ...

9 Monate ago

Solved

Efficiency of a single phase Transformer
Calculate the efficiency of a single phase transformer whose KVA rating is A KVA, loading factor x,power factor p,full load copp...

9 Monate ago

Solved

Calculate Resistance
Calculate Resistance R of a linear conductor having resistivity p, length l and area A

9 Monate ago

Solved

Calculate Resistance 2
In this problem, you have to calculate Resistance R of a linear conductor having voltage V across it and current I is passing i...

9 Monate ago

Solved

Add 3 numbers
In this problem, you have to add three numbers a, b and c. Give output d = add(a,b,c)

9 Monate ago

Solved

Sum of a geometric series
Give the sum of the first 'n' terms of a geometric series, given 'a' as the first term and 'r' as the ratio.

9 Monate ago

Solved

Determine if input is odd or even
Determine if input is odd or even, sample problem

11 Monate ago

Solved

Cube root of max value in a vector
Find the cube root of the maximum value in a vector

etwa ein Jahr ago

Solved

Testing Problem Creation
This is where MATLAB based question will be

etwa ein Jahr ago

Solved

Draw 'H'
Draw a x-by-x matrix 'H' using 1 and 0. (x is odd and bigger than 2) Example: x=5 ans= [1 0 0 0 1 1 0 0 0 1 ...

etwa ein Jahr ago

Solved

Draw 'I'
Given n as input, draw a n-by-n matrix 'I' using 0 and 1. example: n=3 ans= [0 1 0 0 1 0 0 1 0] n=...

etwa ein Jahr ago

Solved

Draw 'C'.
Given x as input, generate a x-by-x matrix 'C' using 0 and 1 . example: x=4 ans= [0 1 1 1 1 0 0 0 ...

etwa ein Jahr ago

Solved

Draw 'J'
Given n as input, generate a n-by-n matrix 'J' using 0 and 1 . Example: n=5 ans= [0 0 0 0 1 0 0 0 0 1 0 0 ...

etwa ein Jahr ago

Solved

Draw 'O' !
Given n as input, generate a n-by-n matrix 'O' using 0 and 1 . example: n=4 ans= [1 1 1 1 1 0 0 1 ...

etwa ein Jahr ago

Solved

Draw a 'X'!
Given n as input Draw a 'X' in a n-by-n matrix. example: n=3 y=[1 0 1 0 1 0 1 0 1] n=4 y=[1 0 0...

etwa ein Jahr ago

Solved

Draw a 'N'!
Given n as input, generate a n-by-n matrix 'N' using 0 and 1 . Example: n=5 ans= [1 0 0 0 1 1 1 0 0 1 1 0 ...

etwa ein Jahr ago

Solved

Find the area of a triangle having vertices (A,B), (C,D), and (E,F)
Find the area of a triangle using if we have the three vertices of the triangle

etwa ein Jahr ago

Solved

Pizza order
A pizza order by phone in diameter d1, pizza will be make only in diameter d2. Return the pizza pieces p should be make.(pizza ...

etwa ein Jahr ago

Solved

how many of the entries are positive?
Given x= sin(linspace(0,10*pi,100)), how many of the entries are positive?

mehr als ein Jahr ago

Solved

Draw a 'Z'.
Given _n_ as input, generate a n-by-n matrix like 'Z' by _0_ and _1_ . Example: n=5 ans= [1 1 1 1 1 0 0 0 1 ...

mehr als ein Jahr ago

Solved

Prime numbers between a , b.
Find all prime number between a & b. example: a=100 b=120 y= [101 103 107 109 113]

mehr als ein Jahr ago

Solved

Try your chance!!!
There is a bomb in 3 cell! You must find the bomb. choose one of these cells and try your chance: 1 2 3 ? ? ? ...

mehr als ein Jahr ago

Load more