A résolu


Draw 'O' !
Given n as input, generate a n-by-n matrix 'O' using 0 and 1 . example: n=4 ans= [1 1 1 1 1 0 0 1 ...

plus de 3 ans il y a

A résolu


Draw a '5' in a zero matrix!

plus de 3 ans il y a

A résolu


Draw a '2' in a zero matrix!

plus de 3 ans il y a

A résolu


Draw a '1' in a zero matrix!

plus de 3 ans il y a

A résolu


Draw a '4' in a zero matrix!

plus de 3 ans il y a

A résolu


Draw a '3' in a zero matrix!

plus de 3 ans il y a

A résolu


Draw a '9' in a zero matrix!

plus de 3 ans il y a

A résolu


Draw a '8' in a zero matrix!

plus de 3 ans il y a

A résolu


Draw a '6' in a zero matrix!

plus de 3 ans il y a

A résolu


Draw a '7' in a zero matrix!

plus de 3 ans il y a

A résolu


Summy's even sum

plus de 3 ans il y a

A résolu


Summy's odd sum

plus de 3 ans il y a

A résolu


Combinations without using nchoosek
You have to generate a matrix with all possible combinations of n elements *taken 2* at a time, *without using nchoosek(1:n,2)* ...

plus de 3 ans il y a

A résolu


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

plus de 3 ans il y a

A résolu


Compute Fibonacci Number
Compute the _n_-th Fibonacci Number f(0) = 0, f(1) = 1, f(2) = 1, f(3) = 2, ... f(42) = 267914296

plus de 3 ans il y a

A résolu


Determine if given number is perfect
A number is <http://en.wikipedia.org/wiki/Perfect_number perfect> if it is equal to the sum of its factors, excluding itself. ...

presque 4 ans il y a

A résolu


That's some divisor you've got there...
Given a positive integer x, calculate the sum of all of the divisors of the number. Please include the number itself in your fi...

presque 4 ans il y a

A résolu


Divisors of an integer
Given a number N, return a vector V of all integers that divide N. For example, N = 10 Then V=[1 2 5 10]

presque 4 ans il y a

A résolu


Amicable numbers
Test whether two numbers are <https://en.wikipedia.org/wiki/Amicable_numbers amicable>, meaning that the sum of the proper divis...

presque 4 ans il y a

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 4 ans il y a

A résolu


Determine if input is a perfect number
A <http://en.wikipedia.org/wiki/Perfect_number/ perfect number> occurs whent the sum of all divisors of a positive integer, exce...

presque 4 ans il y a

A résolu


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

presque 4 ans il y a

A résolu


Divisors

presque 4 ans il y a

A résolu


Create a matrix X, where each column is a shifted copy of the vector v
Example : in->v = (1:5)'; 1 2 3 4 5 out-> [1 5 4 3 2;2 1 5 4 3;3 2 1 5 4;4 3 2 1 5;5 4 3 ...

presque 4 ans il y a

A résolu


Mirror Image matrix across anti-diagonal
Given an input number x, create a mirror image matrix 'Y' across the anti-diagonal. For example, if x=3, Y = [1 2 3; ...

presque 4 ans il y a

A résolu


Generate this matrix
Generate the following matrix. n = 2; out = [-4 -3 -2 -1 0 -3 -2 -1 0 1 -...

presque 4 ans il y a

A résolu


ZigZag matrix with reflected format
ZigZag MATRIX with REFLECTED format. We have only input x. We have to create a matrix in the following pattern. input n=5...

presque 4 ans il y a

A résolu


Pascal's Matrix
Given an integer n &ge; 0, generate the ( _n_+1) &times; ( _n_+1) lower triangular <http://en.wikipedia.org/wiki/Pascal_matrix P...

presque 4 ans il y a

A résolu


Symmetric matrix
You must create a n-by-n *symmetric* matrix such that A(row,col) = row/col for col >= row. Example if n =3 : output is : ...

presque 4 ans il y a

A résolu


Make a Star Pyramid
Create a star pyramid. First line will have 1 star, second will have two stars and so on... a basic program which is easily done...

presque 4 ans il y a

Charger plus