Community Profile

# Anupam Agarwal

### Anand International College of Engineering, Jaipur

495 2014 年以降の合計貢献数

Assistant Professor(EEE)

#### Anupam Agarwal's バッジ

Return area of square
Side of square=input=a Area=output=b

Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

Find the Oldest Person in a Room
Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...

Convert from Fahrenheit to Celsius
Given an input vector |F| containing temperature values in Fahrenheit, return an output vector |C| that contains the values in C...

Calculate Amount of Cake Frosting
Given two input variables |r| and |h|, which stand for the radius and height of a cake, calculate the surface area of the cake y...

Product of a and b
return the value of c = a*b

10ヶ月 前

Determina el número de cifras de un número
Crea una función que te devuelva el número de cifras de un número. Algunos ejemplos para ayudarte serían: El número 125 tie...

10ヶ月 前

ZigZag - 05
Given a matrix, print all its elements in the alpha form. For example - a=[16 2 3 13 5 11 10 8 ...

10ヶ月 前

Characterize fluid flow in a pipe as to laminar or turbulent
In fluid mechanics, characterizing the flow in a pipe is essential to predicting its behavior. The flow pattern can either be la...

10ヶ月 前

Mid-term report
You just got your mid-term report, but it's full of ones and twos :(. So before you give it to your parents, you change it, in o...

10ヶ月 前

Compute the missing quantity among P, V, T for an ideal gas
Consider 100 mol of helium gas at a certain pressure (P), volume (V), and temperature (T). Assuming that the ideal gas law appli...

10ヶ月 前

Sum of series
a(n) = n^2 - (n-1)^2 find the summation of the series upto n i.e. a(1)+a(2)+...+a(n)

10ヶ月 前

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

1年以上 前

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]

1年以上 前

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

1年以上 前

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

1年以上 前

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

1年以上 前

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

1年以上 前

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

1年以上 前

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

2年弱 前

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

2年弱 前

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

2年弱 前

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

2年弱 前

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

2年弱 前

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

2年弱 前

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.

2年弱 前

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

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

Testing Problem Creation
This is where MATLAB based question will be

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

2年以上 前