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

oltre 6 anni ago

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

oltre 6 anni 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...

oltre 6 anni 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....

oltre 6 anni 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...

oltre 6 anni ago

Solved

Half-Swap

Given a vector with an even number of elements, rearrange it so that the elements in its first half are switched with those i...

oltre 6 anni ago

Solved

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

oltre 6 anni ago

Solved

Find best domino orientation

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

oltre 6 anni ago

Solved

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

oltre 6 anni ago

Solved

Return elements unique to either input

Given two numeric inputs a and b, return a row vector that contains the numbers found in only a or only b, but not both. For ex...

circa 7 anni ago

Solved

Free passes for everyone!

_Simply return the name of the coolest numerical computation software ever_ *Extra reward* (get a _freepass_): As an addit...

circa 7 anni 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

circa 7 anni ago

Solved

Whether the input is vector?

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

circa 7 anni ago

Solved

Circle area using pi

Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.

circa 7 anni 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];

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

circa 7 anni ago

Solved

Simple equation: Annual salary

Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

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

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

circa 7 anni 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,...

circa 7 anni ago

Solved

Read a Soroban Abacus

*Description* The Soroban is the name of the modern Japanese abacus. Information on reading a Soroban can be found <http://we...

circa 7 anni ago

Solved

Path of least resistance

Find the length of the shortest path through the matrix from the top left to bottom right corner. You may move right, down, or d...

circa 7 anni ago

Solved

Generate a vector like 1,2,2,3,3,3,4,4,4,4

Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

circa 7 anni ago

Solved

Remove the air bubbles

Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...

circa 7 anni ago

Solved

Return the 'Size' of a String of Code

One of the most 'mysterious' parts of playing Cody is the sizing system. Given a string of commands, return the size that Cody w...

circa 7 anni ago

Solved

Pull the variable y_correct from the Caller's Workspace

*Description* This highlights a very easy to use and high-scoring cheat that can be used on almost all Cody questions.

circa 7 anni ago

Solved

Make an N-dimensional Multiplication Table

*INSTRUCTIONS* This is a multi-dimensional variant of the normal multiplication table used to teach elementary students multi...

circa 7 anni ago

Solved

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

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

circa 7 anni 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

circa 7 anni ago