解決済み

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

4ヶ月 前

解決済み

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

4ヶ月 前

解決済み

Vector creation

Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

4ヶ月 前

解決済み

Flip the vector from right to left

Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

4ヶ月 前

解決済み

Get the length of a given vector

Given a vector x, the output y should equal the length of x.

4ヶ月 前

解決済み

Can we make a triangle?

Given three positive number, check whether a triangle can be made with these sides length or not. remember that in a triangle su...

4ヶ月 前

解決済み

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

4ヶ月 前

解決済み

Is the Point in a Triangle?

Check whether a point or multiple points is/are in a triangle with three corners Points = [x, y]; Triangle = [x1, y1; x...

4ヶ月 前

解決済み

Right Triangle Side Lengths (Inspired by Project Euler Problem 39)

If _p_ is the perimeter of a right angle triangle with integral length sides, { _a_, _b_, _c_ }, there are exactly three solutio...

4ヶ月 前

解決済み

Calculate the area of a triangle between three points

Calculate the area of a triangle between three points: P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) these three points are the vert...

4ヶ月 前

解決済み

Find my daddy long leg (No 's')

Given the ratio of the two legs (longer / shorter), and the hypotenuse length, find the value of the bigger leg.

4ヶ月 前

解決済み

Choose the best fitting dominoes

You will be given a cell array of nx2 matrices. Choose one row from each matrix. These are the ordered pairs that will be plac...

4ヶ月 前

解決済み

Find best placement for ordered dominoes (harder)

Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

4ヶ月 前

解決済み

Find perfect placement of non-rotating dominoes (easier)

Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

4ヶ月 前

解決済み

Stuff the Board

You have a stack of tiles to put onto an array-like playing board. Each tile has a number (always an integer), and the board var...

4ヶ月 前

解決済み

Triangle sequence

A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the s...

4ヶ月 前

解決済み

Binary numbers

Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

4ヶ月 前

解決済み

Most nonzero elements in row

Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

4ヶ月 前

解決済み

Sort a list of complex numbers based on far they are from the origin.

Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

4ヶ月 前

解決済み

Determine if input is odd

Given the input n, return true if n is odd or false if n is even.

4ヶ月 前

解決済み

Nearest Numbers

Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

4ヶ月 前

解決済み

Counting Money

Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

4ヶ月 前

解決済み

Pangrams!

A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

4ヶ月 前

解決済み

Remove any row in which a NaN appears

Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

4ヶ月 前

解決済み

Remove the vowels

Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

4ヶ月 前