A résolu


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

presque 6 ans il y a

A résolu


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

presque 6 ans il y a

A résolu


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

presque 6 ans il y a

A résolu


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

presque 6 ans il y a

A résolu


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

presque 6 ans il y a

A résolu


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

presque 6 ans il y a

A résolu


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

presque 6 ans il y a

A résolu


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

presque 6 ans il y a

Réponse apportée
Moving Specific Values In Matrix By One Column
check this circshift(x,-1,2)

presque 6 ans il y a | 0

Réponse apportée
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.

presque 6 ans il y a | 1

A résolu


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

presque 6 ans il y a

A résolu


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

presque 6 ans il y a

A résolu


sign function

presque 6 ans il y a

A résolu


step function

presque 6 ans il y a

A résolu


find the index of a number

presque 6 ans il y a

A résolu


Test

presque 6 ans il y a

A résolu


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

presque 6 ans il y a

A résolu


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

presque 6 ans il y a

A résolu


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

presque 6 ans il y a

A résolu


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

presque 6 ans il y a

A résolu


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

presque 6 ans il y a

A résolu


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

presque 6 ans il y a

A résolu


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

presque 6 ans il y a

A résolu


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

presque 6 ans il y a

A résolu


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

presque 6 ans il y a

A résolu


How many bytes an image requires from RAM?

presque 6 ans il y a

A résolu


Matrix for beginners
Multiply x and y elemwise.

presque 6 ans il y a

A résolu


Estimate Pi by Monte Carlo method

presque 6 ans il y a

A résolu


Distance Travelled by Vehicle

presque 6 ans il y a

Charger plus