Community Profile

# bainhome

### NEU

2.630 total contributions since 2013

View all

Contributions in
View by

Solved

Last non-zero digit
Given a number n, find the last non-zero digit of the factorial of that number. You need to take care of the large values of n....

circa 2 ore ago

Solved

Pell numbers
Find the nth pell number <https://en.wikipedia.org/wiki/Pell_number>

circa 9 ore ago

Solved

Tribonacci Sequence
Generate the tribonacci sequence upto n

circa 9 ore ago

Solved

Find the sequence
Find the nth number of a sequence. Check the test suite to determine the sequence. * hint: it is closely related to familiar ...

circa 9 ore ago

Solved

Find index of non empty cell array
This question aims to understand the characteristics of MATLAB programs. Educational problem. Please find non empty index of ...

circa 10 ore ago

Solved

A "Complex" Converter: Rectangular Form <-> Polar Form
*BACKGROUND / MOTIVATION:* Complex numbers can be an important tool in an electrical engineer's toolbox because they can help...

circa 10 ore ago

Solved

Smallest distance between a point and a rectangle
Given two points *x* and *y* placed at opposite corners of a rectangle, find the minimal euclidean distance between another poin...

1 giorno ago

Solved

Clockwise or Counterclockwise
Given a list of 2-d points defining the vertices of a polygon, determine whether these points are sorted clockwise. The input...

1 giorno ago

Solved

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

1 giorno ago

Solved

Dots in a Sphere
Return how many integer grid points there are inside a 3D sphere of radius _r_ centred at (0,0,0) (including points on the edge)...

1 giorno ago

Solved

Edges of a n-dimensional Hypercube
Return the number of edges on an <http://en.wikipedia.org/wiki/Hypercube _n_-dimensional hypercube> (with an integer n &ge; 0). ...

1 giorno ago

Solved

Calculate the square root of a number
Input a Output b = srt(a)

1 giorno ago

Solved

Volume of a Simplex
Return the volume of a <http://en.wikipedia.org/wiki/Simplex regular _n_-simplex> with a unit side length. Results are up to...

1 giorno ago

Solved

Find the Area of a Polygon
Consider 2-D geometry and assume that the points are given in form of rows of a matrix. Find the area of polygon enclosed by the...

2 giorni ago

Solved

Radiation Heat Transfer — View Factors (1)
View factors (aka configuration factors) are utilized in some radiation heat transfer models to estimate heat transfer rates bet...

2 giorni ago

Solved

rectangle in circle
In the figure below, the rectangle at the corner measures a cm x b cm. What is the radius of the circle in cm? <<http://www....

2 giorni ago

Solved

Avalaible area: wall construction
You need to build a wall to enclose a certain area. Calculate the available area after you build the wall. Assumptions * ...

2 giorni ago

Solved

Vector parallel to plane?
Given the coefficients of the equation which defines a plane as follows: ax+by+cz=d, return a boolean indicating whether the 2n...

2 giorni ago

Solved

Slicing the cube
A bored matlab enthusiast has a cube with volume n^3. He decides to paint the entire surface of the cube red. Then, with slices...

2 giorni ago

Solved

Fun with a compass
Each night for the past week, you have been having the same nightmare: You find yourself back in your junior high school geometr...

3 giorni 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]

3 giorni ago

Solved

How many Fibonacci numbers?
Find the number of unique Fibonacci numbers (don't count repeats) in a vector of positive integers. Example: x = [1 2 3 4...

3 giorni ago

Solved

Find the sides of an isosceles triangle when given its area and height from its base to apex
Find the sides of an isosceles triangle when given its area and the height from its base to apex. For example, with A=12 and ...

3 giorni ago

Solved

Height of a right-angled triangle
Given numbers a, b and c, find the height of the right angled triangle with sides a and b and hypotenuse c, for the base c. If a...

3 giorni ago

Solved

Acid and water
&#9878; &#9878; &#9878; &#9878; &#9878; &#9878; &#9878; &#9878; Assume that there is a 100 liter tank. It is initially fi...

4 giorni ago

Solved

Rescale Scores
Each column (except last) of matrix |X| contains students' scores in a course assignment or a test. The last column has a weight...

4 giorni ago

Solved

Find MPG of Lightest Cars
The file |cars.mat| contains a table named |cars| with variables |Model|, |MPG|, |Horsepower|, |Weight|, and |Acceleration| for ...

4 giorni ago

Solved

Crop an Image
A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. An element value re...

4 giorni ago

Solved

Calculate Inner Product
Given two input matrices, |x| and |y|, check if their inner dimensions match. * If they match, create an output variable |z|...

4 giorni ago

Solved

Find the Best Hotels
Given three input variables: * |hotels| - a list of hotel names * |ratings| - their ratings in a city * |cutoff| - the rat...

5 giorni ago