Resuelto


Expression or variable?
Test if arguments of the function are all variables (workspace variables names). Return 1 if yes, 0 if no. For example : ...

más de 1 año hace

Resuelto


Narcissistic number ?
Inspired by Problem 2056 created by Ted. In recreational number theory, a narcissistic number is a number that is the sum of ...

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


Find the repeating elements and repetitions of a row vector.
So let's say that x is a vector, for example, x = [4, 4, 5, 5, 5, 6, 7, 7,8, 8, 8, 8] Now we want to get the following two ve...

más de 1 año hace

Resuelto


Will there be a new leader?
Simply answer the title.

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


Morse Code Generator! Try it!
.... . .-.. .-.. --- . ...- . .-. -.-- --- -. . -.-.-- .-.. . - ... -.. --- ... --- -- . -- --...

más de 1 año hace

Resuelto


Backslang, odds are you used it at some point in time...
So backslang is a language that can be used to communicate in an easy decode code, if people know the rules of decoding it. Wel...

más de 1 año hace

Resuelto


counting groups!
This problem is about counting groups. Example If you have x: x = [0.8 0.8 0.8 0.3 0.3 0.4 0.5 0.6 0.6 0.9] then a...

más de 1 año hace

Resuelto


Ripping numbers apart!
So you have to "rip" a number apart into individual digits... The end output is a cell. That is if: x = 12345678 o...

más de 1 año hace

Resuelto


Can you beat the lottery?
Well this one you may not get every time, but it is a lottery! Here is the code that generates the lottery numbers (you can try ...

más de 1 año hace

Resuelto


Make an N-dimensional Multiplication Table
*INSTRUCTIONS* This is a multi-dimensional variant of the normal multiplication table used to teach elementary students multi...

más de 1 año hace

Resuelto


Cache me Outside
The test suite includes a simple recursive Fibonacci sequence generator, but it's terribly inefficient. One simple method for im...

más de 1 año hace

Resuelto


Next Higher Power of B
|Given a number _n_ and a base _B_ greater than 1, return the lowest integer power of _B_ that is greater than or equal to _n_. ...

más de 1 año hace

Resuelto


The Dark Side of the Die
It is well-known that opposite sides of a classic hexahedral die add to 7. Given a vector of dice rolls, calculate the sum of th...

más de 1 año hace

Resuelto


Find number of days
The input is two date in string format (dd-mm-yyyy) find out the number of days between these two dates. Example: input: ...

más de 1 año hace

Resuelto


Find same numbers touching each other...
So the goal here is to find any number that is equal to its immediate neighbors and mark it true. Here is some examples: x...

más de 1 año hace

Resuelto


Finding neighbors of [-1:1] in a matrix....
Hello All! Well I found this one fun to figure out, all you have to do is make a matrix of 1's or 0's (true or false) that sh...

más de 1 año hace

Resuelto


Finding the next number in a number list, are you able to crack it!
So it goes like this, I give a number list and you find the next value! I found a way to do it, just wondering how many other...

más de 1 año hace

Resuelto


NO _________ ALLOWED....
So you're given a sentence where if there is a particular word in the sentence then the output is 1, if it is not there then the...

más de 1 año hace

Resuelto


Twins in a Window
<http://en.wikipedia.org/wiki/Twin_primes Twin primes> are prime numbers that differ by 2, such as [11,13] or [41,43]. Write a f...

más de 1 año hace

Resuelto


Construct an index vector from two input vectors in vectorized fashion
Create an index vector defined by two input vectors, one defining the beginnings of one or more index ranges, and the other defi...

más de 1 año hace

Resuelto


Compute a sum of Ramanujan
Srinivasa Ramanujan defined the following function: Write a function to compute for various values of . See also Cody Proble...

más de 1 año hace

Resuelto


Array GCD
* Find Greatest Common Divisor in a given array * Function Template: function ans = arraygcd(a) % a=[45 15 200 ...

más de 1 año hace

Resuelto


Neural Net: Calculate Perceptron
This challenge is to calculate the Neural Net Perceptron value,P, given X, WH, and WP using ReLU on the hidden layer. This examp...

más de 1 año hace

Resuelto


Find the first N zeros of the 666 function
Using the following definition of the 666 function for this problem: _f(n)=sin('nnn')-cos(n*n*n)_, write a function that returns...

más de 1 año hace

Resuelto


Unusual Concatenations
The sum of the squares of certain unusual integers is equal to the concatenation of their individual digits. For example: ...

más de 1 año hace

Resuelto


Squares of odd numbers upto a given range
Find the squares of odd numbers upto a given range. If Given x=6 return y=(1^2,3^2,5^2) y=1,9,25 If Given x=5 retu...

más de 1 año hace

Resuelto


Ordered pairs of integers (I, J).
Write a MATLAB function that calculates the number of ordered pairs of integers (I, J) that can be formed satisfying the conditi...

más de 1 año hace

Resuelto


Move if I am Optimus Prime
If the number is a prime, roll out!

más de 1 año hace

Cargar más