Solved

Is this triangle right-angled?

Given any three positive numbers a, b, c, return true if the triangle with sides a, b and c is right-angled. Otherwise, return f...

mehr als 7 Jahre ago

Solved

Area of an equilateral triangle

Calculate the area of an equilateral triangle of side x. <<http://upload.wikimedia.org/wikipedia/commons/e/e0/Equilateral-tr...

mehr als 7 Jahre ago

Solved

Area of an Isoceles Triangle

An isosceles triangle has equal sides of length x and a base of length y. Find the area, A, of the triangle. <<http://upload...

mehr als 7 Jahre ago

Solved

Find the largest value in the 3D matrix

Given a 3D matrix, A, find the largest value. E.g. >> A = 1:9; >> A=reshape(A,[3 1 3]); >> islargest(A) ans = 9

fast 8 Jahre ago

Solved

Length of a short side

Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

fast 8 Jahre ago

Solved

Number of 1s in a binary string

Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

fast 8 Jahre ago

Solved

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

fast 8 Jahre ago

Solved

Scoring for oriented dominoes

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

fast 8 Jahre ago

Solved

Rotate a Matrix

Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

fast 8 Jahre ago

Solved

Whether the input is vector?

Given the input x, return 1 if x is vector or else 0.

fast 8 Jahre ago

Solved

Length of the hypotenuse

Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

fast 8 Jahre ago

Solved

Lightning strike distance: Writing a function

Write a function named LightningDistance that outputs "distance" given input "seconds". Seconds is the time from seeing lightnin...

fast 8 Jahre ago

Solved

Pizza value using expression with parentheses

Pizza prices are typically listed by diameter, rather than the more relevant feature of area. Compute a pizza's value (cost per ...

fast 8 Jahre ago

Solved

Arrange vector in ascending order

Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

etwa 8 Jahre ago

Solved

Number of Horns on a unicorn!

Calculate the number of horns on a *unicorn*! And I'm talking about a unicorn with not more than one horn on it!

etwa 8 Jahre ago

Solved

Rotate a Matrix by 90 degrees

Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...

etwa 8 Jahre ago

Solved

Fahrenheit to Celsius using multiple statements

Given a Fahrenheit value F, convert to a Celsius value C. While the equation is C = 5/9 * (F - 32), as an exercise use two state...

etwa 8 Jahre ago

Solved

Is this triangle right-angled?

Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

etwa 8 Jahre ago

Solved

Multiply a column by a row

* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

etwa 8 Jahre ago

Solved

Compute a dot product of two vectors x and y

x and y are input vectors, d is a number and contains their dot product

etwa 8 Jahre ago

Solved

Determine Whether an array is empty

Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

etwa 8 Jahre ago

Solved

Duplicate each element of a vector.

for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

etwa 8 Jahre ago

Solved

Getting the indices from a vector

This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

etwa 8 Jahre ago

Solved

Getting logical indexes

This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

etwa 8 Jahre ago

Solved

Check if number exists in vector

Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

etwa 8 Jahre ago

Solved

Convert a vector into a number

This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

etwa 8 Jahre ago

Solved

Given a window, how many subsets of a vector sum positive

Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

etwa 8 Jahre ago

Solved

Implement simple rotation cypher

If given a letter from the set: [abc...xyz] and a shift, implement a shift cypher. Example: 'abc' with a shi...

etwa 8 Jahre ago

Solved

Get the length of a given vector

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

etwa 8 Jahre ago

Solved

Multielement indexing of a row array

The row array birthRateChina stores the China birth rate (per 1000 people) for years 2000 to 2012. Write a statement that create...

etwa 8 Jahre ago