Solved

Matlab Basics II - Minimum
Write a function that returns the minimum of each ROW of a matrix x example: x = [1 2 3; 4 5 6]; output [1;4];

oltre un anno ago

Solved

Compare two input matrices
Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0". Exa...

oltre un anno ago

Solved

Element by element multiplication of two vectors
Given two input vectors, return the element-by-element product. Example A = [1 2 3] B = [7 3 1] The answer should be...

oltre un anno ago

Solved

Roots
Find out the roots of a given polynomial equation.Given are the coefficients of the equation.

oltre un anno ago

Solved

Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

oltre un anno ago

Solved

Distance walked 2D
Suppose you go from x-y coordinates [3,4] to [0,0] to [0,1] to [1,1], then you walked 7 units of distance.

oltre un anno ago

Solved

Sorting
Assume that x is an n-by-2 matrix. The aim is to return the first column of x, but sorted according to the second column. Exa...

oltre un anno ago

Solved

Solve the set of simultaneous linear equations
Given this pair of simultaneous linear equations: 2x + 3y = 23 3x + 4y = 32 Find the solution set (x,y)

oltre un anno ago

Solved

Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

oltre un anno ago

Solved

Sophie Germain prime
In number theory, a prime number p is a *Sophie Germain prime* if 2p + 1 is also prime. For example, 23 is a Sophie Germain prim...

oltre un anno ago

Solved

What is the distance from point P(x,y) to the line Ax + By + C = 0?
Given a point, P(x,y), find the distance from this point to a linear line. INPUTS: x, y, A, B, C OUTPUTS: d, the distance ...

oltre un anno ago

Solved

Narcissistic number ?
Inspired by Problem 2056 created by Ted. In recreational number theory, a narcissistic number is a number that is the sum of ...

oltre un anno ago

Solved

Find the body mass index. For reference, please refer to Wikipedia here: <http://en.wikipedia.org/wiki/Body_mass_index body ...

oltre un anno ago

Solved

Armstrong Number
Determine whether the given input n-digit number is Armstrong Number or not. Return True if it is an Armstrong Number. An n-D...

oltre un anno ago

Solved

Number of toolboxes?
Return a number equal to the number of toolboxes available to the Cody solvers.

oltre un anno ago

Solved

Positive Infinity
Round the array a towards positive infinity

oltre un anno ago

Solved

Generate a NaN...on purpose
The goal is to create a function that will return a single "NaN" without using the nan function. I am interested to see how many...

oltre un anno ago

Solved

Find the area of a triangle
Given a triangle with a base b and height h, return the triangle area.

oltre un anno ago

Solved

Switch matrix to a column vector
for e.g. x = [1 2 3 4] y = 1 3 2 4

oltre un anno ago

Solved

Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

oltre un anno ago

Solved

Replacing a row
For matrix G=[1 2 3; 4 5 6; 7 8 9] Replace the 2nd row with 8s **remember to create matrix G

oltre un anno ago

Solved

Vector Multiplication
Vector Multiplication of three matrix as shown in test cases.

oltre un anno ago

Solved

Find the 9's Complement
Find the 9's complement of the given number. An example of how this works is <http://electrical4u.com/9s-complement-and-10s-c...

oltre un anno ago

Solved

Given a complex number, output quadrant 'I' 'II' 'III' or 'IV' | II | I | ...

oltre un anno ago

Solved

What is Sum Of all elements of Matrix
Given the matrix x, return the sum of all elements of matrix. Example: Input x = [ 1 2 0 0 0 0 6 9 3 3 ] ...

oltre un anno ago

Solved

Draw a 'N'!
Given n as input, generate a n-by-n matrix 'N' using 0 and 1 . Example: n=5 ans= [1 0 0 0 1 1 1 0 0 1 1 0 ...

oltre un anno ago

Solved

CONVERT TAN TO SIN
In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

oltre un anno ago

Solved

Matlab Basics II - squares
Write a function that takes matrix A, and squares each element in the matrix example: A = [1 2 3] output = [1 4 9]

oltre un anno ago

Solved

y equals x divided by 2
function y = x/2

oltre un anno ago

Solved

Create a Multiplication table matrix...
Create a product table in this format: P = [ 1 2 3 4 5; 2 4 6 8 10; 3 6 9 12 15; 4 8 12 1...

oltre un anno ago