A résolu


Is input the global variable z?
When the input is certainly not the global variable |z|, your function must return |false|. Otherwise return |true|. All input...

presque 8 ans il y a

A résolu


Integer sequence - 2 : Kolakoski sequence
Get the n-th term of <https://oeis.org/A000002 Kolakoski Sequence>.

presque 8 ans il y a

A résolu


Monte Carlo integration: area of a polygon
The area of a polygon (or any plane shape) can be evaluated by <https://www.mathworks.com/matlabcentral/cody/problems/179 Monte ...

presque 8 ans il y a

A résolu


Comparison of floating-point numbers (singles)
<https://au.mathworks.com/help/matlab/matlab_prog/floating-point-numbers.html Floating-point numbers> cannot generally be repres...

presque 8 ans il y a

A résolu


Comparison of floating-point numbers (doubles)
<https://au.mathworks.com/help/matlab/matlab_prog/floating-point-numbers.html Floating-point numbers> cannot generally be repres...

presque 8 ans il y a

A résolu


Numbers on 7-segment
This is a 7-segment: _ |_| |_| It's a 3-by-3 char matrix.It has made by 3 characters: '_' , '|' and ' ' (space...

presque 8 ans il y a

A résolu


Kurosu Solver
This problem is related to <https://www.mathworks.com/matlabcentral/cody/problems/44657-kurosu-checker Problem 44657>. The ga...

presque 8 ans il y a

A résolu


find number of times of occurrence of the most frequent number in a row vector
In a given row vector, find the number of times a mode of a row vector has occurred example: in [2 5 5 5 5 3], output is 4 ...

presque 8 ans il y a

A résolu


Kurosu Checker
The game of Kurosu is simple. A square grid contains cells that can be filled with either a 'X' or an 'O', similarly to a tic-ta...

environ 8 ans il y a

A résolu


Basics: counting digits of a number irrespective of the sign
publish the number of digits in any input integer example: -23---->2

environ 8 ans il y a

A résolu


Draw a 'X'!
Given n as input Draw a 'X' in a n-by-n matrix. example: n=3 y=[1 0 1 0 1 0 1 0 1] n=4 y=[1 0 0...

environ 8 ans il y a

A résolu


N-Dimensional Array Slice
Given an N-dimensional array, _A_, an index, _I_, and a dimension, _d_, return the _I_ th elements of _A_ in the _d_ dimension. ...

environ 8 ans il y a

A résolu


Outlier number!
Find a number which has maximum distance from the mean value of vector A. Example: A=[5 2 1 5 6 2 5 9] y=9

environ 8 ans il y a

A résolu


Prime numbers between a , b.
Find all prime number between a & b (including a and b). example: a=100 b=120 y= [101 103 107 109 113]

environ 8 ans il y a

A résolu


Win all the time!
This is a 2-players game. One of them is your algorithm. Your algorithm must win in all games. In this game there are 3 rows...

environ 8 ans il y a

A résolu


Draw a 'Z'.
Given _n_ as input, generate a n-by-n matrix like 'Z' by _0_ and _1_ . Example: n=5 ans= [1 1 1 1 1 0 0 0 1 ...

environ 8 ans il y a

A résolu


Calculate mean value of any pair in a vector.
Given a vector A, calculate the mean of 2 number in the vector one by one. example: input: A=[1, 5, 6, 8, 9, 15] output:...

environ 8 ans il y a

A résolu


Still more miles to go before I sleep
It's time for more odometer fun. Last problem, my car's odometer hit 56789. It's coming up on 111111 now, which (barring a maj...

environ 8 ans il y a

A résolu


Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

environ 8 ans il y a

A résolu


Repetition of matrices
*A is a bold matrix: [1 2 3; 4 5 6;7 8 9]* Given an integer 'n' , a matrix B exists such that has n copies of A in the row an...

environ 8 ans il y a

A résolu


Guess the number I'm thinking of
In this game you are competing against two other people to guess the number that I'm thinking of. # I randomly choose an *i...

environ 8 ans il y a

A résolu


Write a function man that takes a row vector v and returns a matrix H as follows..
Write a function called man that takes a row vector v as an input and returns a matrix H whose first column consist of the eleme...

environ 8 ans il y a

A résolu


The other half of the Fibonacci sequence
The <http://mathworld.wolfram.com/FibonacciNumber.html "Fibonacci sequence"> — F = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144,...

environ 8 ans il y a

A résolu


The maximum sum of squares (testing)
Create a function file with an input maxval to determine the maximum number of terms for the series 1^2 + 2^2 + 3^2 + ... such t...

environ 8 ans il y a

A résolu


Find the missing numbers.
Total *N* numbers are in the series of natural numbers ( *1,2,3,...,N* ). The input is an array (unsorted) of those natural num...

environ 8 ans il y a

A résolu


Angle bisectors
Given 2 direction vectors, calculate the *_two_ (2) normalized angle bisectors* (which are perpendicular between them). Input...

environ 8 ans il y a

A résolu


Under the sea: Snell's law & total internal reflection
<https://en.wikipedia.org/wiki/Snell's_law> When a light travels from one medium to another medium, depending on the refracti...

environ 8 ans il y a

A résolu


solid of revolution
Given an real polynomial P and two real numbers a,b with 0<=a<=b. Calculate the volume of the solid of revolution made by rota...

environ 8 ans il y a

A résolu


Pancakes for everyone!
Accordingly to the <http://nl.mathworks.com/matlabcentral/cody/problems/42460-the-cake-is-a-lie problem 42460>. All the children...

environ 8 ans il y a

A résolu


Funny problems
Generate the following vector: if n=1 then q=1; elseif n=2 then q=[2 2 1]; elseif n=3 then q=[3 3 3 2 2 1]; ... end

environ 8 ans il y a

Charger plus