Resuelto


find "greatest common divisor" of two integer value
A function to find Greatest Common Divisor of two integer input E.G. x=-18 y=96 output should be +6 x=-18; y=96; >>your...

más de 9 años hace

Resuelto


find the Area of a rectangle
length is x width is y what is the area of the rectangle?

más de 9 años hace

Resuelto


Calculating cost
You sold a Product at $x and gain 10% What was the cost of the product?

más de 9 años hace

Resuelto


Select every other element of a matrix
Write a function called outMat = odd_idx( myMat ) that takes a matrix, myMat, as input argument and returns a matrix th...

más de 9 años hace

Resuelto


list of prime numbers
n is given find the largest prime number <=n

más de 9 años hace

Resuelto


Find remainder when x is divided by 3
Find remainder when x is divided by 3

más de 9 años hace

Resuelto


Calculating selling price
Cost of a Product is $x What should be the selling price if you want to gain 10%?

más de 9 años hace

Resuelto


Prime number removal
remove all prime numbers from the input e.g. input = 1 2 3 4 5 6 7 8 9 10 11 12 ...

más de 9 años hace

Resuelto


Vector multiplication
Given two row vectors, v1 and v2, each representing an integer, such that the vector elements are the digits from left to right,...

más de 9 años hace

Resuelto


iteration of N blank spot
we have N spot which can be blank o filled calculate the number of iteration for these spots. e.g. N=2 1- blank blank 2- bl...

más de 9 años hace

Resuelto


Sums of cubes and squares of sums
Given the positive integers 1:n, can you: 1. Compute twice the sum of the cubes of those numbers. 2. Subtract the square...

más de 9 años hace

Resuelto


Zero Cross
Can you write a function counts the number of times(n) a signal(x) crosses zero or changes sign. Example x=[1 2 -3 -4 5 ...

más de 9 años hace

Resuelto


Find the inverse permutation
Given a permutation vector perm (a vector of n elements containing all the elements from 1 to n in some order), return the permu...

más de 9 años hace

Resuelto


Nth roots of unity
First, find the n nth roots of unity. eg if n = 6, find the n distinct (complex) numbers such that n^6 = 1. <https://en.wiki...

más de 9 años hace

Resuelto


How Far Can You Throw Something?
As you probably learned in your high school physics class, throwing an object at a 45 degree angle will give you the maximum ran...

más de 9 años hace

Resuelto


Counting the Grand Primes
A grand prime pair is a pair of primes, p1 and p2=p1+1000, such that both numbers are prime. Like a twin prime pair, where the d...

más de 9 años hace

Resuelto


Vector 1 to 15.
Create a vector from 1 to 15.

más de 9 años hace

Resuelto


Free-time Equation
Given a 7-day week, an *_nc_* -number of *_tc_* -hour classes, *_ta_* -hours awake in a day, and *_tw_* -hours that you work in ...

más de 9 años hace

Resuelto


Count consecutive 0's in between values of 1
So you have some vector that contains 1's and 0's, and the goal is to return a vector that gives the number of 0's between each ...

más de 9 años hace

Resuelto


Multiplication
Multiply two numbers in a different manner. The numbers are given to you as vectors x and y. Example x = [ 1 2 0 1 ] ...

más de 9 años hace

Resuelto


Create incremental spiral WITHOUT USING EVAL or FEVAL
Constructions that use feval or eval are used to cheat with cody. This test-suite tries to avoid that trick. The goal of this...

más de 9 años hace

Resuelto


Cofactor
Given a matrix, find the cofactor of the element in 'i'th row and 'j'th column.

más de 9 años hace

Resuelto


means
Calculate the arithmetic, the geometric and the harmonic mean of a given vector (with positive elements) and return them in a ve...

más de 9 años hace

Resuelto


Create a Standard Size Vector
Given an input x, create a row vector y from 1 to x with 5 elements.

más de 9 años hace

Resuelto


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

más de 9 años hace

Resuelto


Knight's Tour Checker
Given a matrix a, determine whether or not a legal <http://en.wikipedia.org/wiki/Knight's_tour knight's tour> is present. The kn...

más de 9 años hace

Resuelto


Approximate e
Given a and n, compute and approximation to f = a * e ^ n, without the use of exp, string operations, or floating point numbers....

más de 9 años hace

Resuelto


jumping astronauts
The surface gravity on the moon is approximately 2 m/s^2. Thats why an funny astronauts feels as light as a feather and jumps fr...

más de 9 años hace

Resuelto


Juggler sequence revisited
This problem is related to <http://www.mathworks.com/matlabcentral/cody/problems/42835-return-the-sequence-element-ii Problem 42...

más de 9 años hace

Resuelto


Babylonian method
Calculate the square root of a given positive number a using the Babylonian method (https://en.wikipedia.org/wiki/Methods_of_co...

más de 9 años hace

Cargar más