Solved


prime to each other
Given two integers n1, n2 greater than 1, find out if they have common divisors or are prime to each other. Return "true" if the...

5 years ago

Solved


Delete the column with all 0 !
Delete the column with all 0 data in a matrix(x). e.g. input x = 1 0 0 4 5 0 7 0 ...

5 years ago

Solved


Find Factrorial without using built-in function
A number is given, you have to find the factorial of the number without using built-in factroial function. You may use loops....

5 years ago

Solved


Average of even-numbered columns
Given a vector, find the average of even-numbered columns. e.g x = [ 4 6 8 9 1 2 7 ] y = ( 6 + 9 + 2 ) / 3

5 years ago

Solved


multiple of nine?
Given a positive number n, return true if n is a multiple of 9 and false if not. Do not make the division and do not use functio...

5 years ago

Solved


Average of odd values
Find the average of odd values in given a matrix. e.g x=[ 4 11 8 ; 9 2 7 ] y =( 11 + 9+ 7 ) / 3

5 years ago

Solved


metre to feet converter
The idea is to make a converter, which exchange meters to feets. We use a factor of 1m = 3.281*1f. so 3m are equals to 9.843 m...

5 years ago

Solved


imaginary results
Return the value of the imaginary number i to the power of input argument n.

5 years ago

Answered
Moving Specific Values In Matrix By One Column
check this circshift(x,-1,2)

5 years ago | 0

Answered
CALCULATE norms: l2 and l1 distances
check here L1 norm: norm(v,1) L2 norm: norm(v,2) norm between a and b: norm((b-a),p) where p can be 1,2 or inf.

5 years ago | 1

Solved


Create a code for XNOR
Given two inputs, output XNOR of those two

5 years ago

Solved


Create cosine function out of sine
Please dont use cos(x) directly

5 years ago

Solved


sign function

5 years ago

Solved


step function

5 years ago

Solved


find the index of a number

5 years ago

Solved


Test

5 years ago

Solved


Guess Cipher
Guess the formula to transform strings as follows: 'Hello World!' --> 'Ifmmp Xpsme!' 'Can I help you?' --> 'Dbo J ifm...

5 years ago

Solved


Calculate the Hamming distance between two strings
Inspired by a similar Cody problem found <http://www.mathworks.com/matlabcentral/cody/problems/93-calculate-the-levenshtein-dist...

5 years ago

Solved


frame of the matrix
Given the matrix M, return M without the external frame.

5 years ago

Solved


Pernicious Anniversary Problem
Since Cody is 5 years old, it's pernicious. A <http://rosettacode.org/wiki/Pernicious_numbers Pernicious number> is an integer w...

5 years ago

Solved


Matrix problem for beginners
Make a matrix [0,0,0;1,1,1;2,2,2]. X=[0,1,2]

5 years ago

Solved


Mid-term report
You just got your mid-term report, but it's full of ones and twos :(. So before you give it to your parents, you change it, in o...

5 years ago

Solved


Box
Give the volume of a box, x is equal to the body diagonal.

5 years ago

Solved


Stairs
Make an n by n matrix, where the elements are ones and zeros. In the main diagonal, and under that, there should be only ones (...

5 years ago

Solved


Square
X is a number, write a code, where Y should be the square of X.

5 years ago

Solved


Matrix for beginners
Multiply x and y elemwise.

5 years ago

Solved


Distance Travelled by Vehicle

5 years ago

Load more