Resuelto


Sum of Two Numbers
Given two integer numbers x and y, calculate their sum and put it in z. Examples: Inputs x = 2, y = 4 Output z is 6 ...

alrededor de 4 años hace

Resuelto


Pentagonal Numbers
Your function will receive a lower and upper bound. It should return all pentagonal numbers within that inclusive range in ascen...

alrededor de 4 años hace

Resuelto


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

alrededor de 4 años hace

Resuelto


only input
Return the output without writing any code into the function.

alrededor de 4 años hace

Resuelto


Make a Plot with Functions
Make a plot and test

alrededor de 4 años hace

Resuelto


Differential equations I
Given a function handle |f| an initial condition |y0| and a final time |tf|, solve numerically the differential equation dy...

alrededor de 4 años hace

Resuelto


Sum of series III
What is the sum of the following sequence: Σ(2k-1)^3 for k=1...n for different n?

alrededor de 4 años hace

Resuelto


Sum of series II
What is the sum of the following sequence: Σ(2k-1)^2 for k=1...n for different n?

alrededor de 4 años hace

Resuelto


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

alrededor de 4 años hace

Resuelto


Numerical Integration
Input * |x0|, a real number greater than 0 Output * |I|, a numerical estimate of the integral x0 / I...

alrededor de 4 años hace

Resuelto


Monte-Carlo integration
Write a function that estimates a d-dimensional integral to at least 1% relative precision. Inputs: * d: positive integer....

alrededor de 4 años hace

Resuelto


Chess probability
The difference in the ratings between two players serves as a predictor of the outcome of a match (the <http://en.wikipedia.org/...

alrededor de 4 años hace

Resuelto


Throwing Dice - Will You Be Eaten By The Dragon?
You and a dragon have agreed to let dice rolls determine whether it eats you or not. The dragon will roll a single die, of x ...

alrededor de 4 años hace

Resuelto


Divisible by 3
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

más de 4 años hace

Resuelto


Divisible by 2
This is the first problem in a set of "divisible by x" problems. You will be provided a number as a string and the function you ...

más de 4 años hace

Resuelto


Back to basics 4 - Search Path
Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the user's portion of the current search...

más de 4 años hace

Resuelto


Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

más de 4 años hace

Resuelto


Proper Factors
Generate the proper factors of input integer x and return them in ascending order. For more information on proper factors, refer...

más de 4 años hace

Resuelto


Find vampire numbers
A <http://en.wikipedia.org/wiki/Vampire_number vampire number> is a number v that is the product of two numbers x and y such th...

más de 4 años hace

Resuelto


Smith numbers
Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at <http://en.wikipedi...

más de 4 años hace

Resuelto


Coin Tossing: Probability of Same Heads for N tosses
A pair of physicists toss a coin n times each. What is the probability that they tossed the same number of heads? *Input:*...

más de 4 años hace

Resuelto


The Birthday Phenomenon
First off, leap years are not being considered for this. In fact the year that people are born shouldn't be taken into considera...

más de 4 años hace

Resuelto


German tank problem
The German tank problem is a well-known statistical problem that attempts to estimate the maximum of a discrete distribution fro...

más de 4 años hace

Resuelto


Break it up! Break it up!
You have N pennies. Write a Matlab script that will reveal how many different ways you can break up those pennies. For example...

más de 4 años hace

Resuelto


Simulating the selection of a state with given probabilities
Lets say we have 3 different states [1,2,3] with the probabilities of occurrences of each state is given as [0.5 0.2 0.3]. Which...

más de 4 años hace

Resuelto


Guess the number I'm thinking of (Part 1)
In this game you are competing against two other people to guess the number that I'm thinking of. I randomly choose an integer ...

más de 4 años hace

Resuelto


Given n, create n random numbers such that their standard deviation is also n.
Given n, create n random numbers such that their standard deviation is also n.

más de 4 años hace

Resuelto


Without the French accent please!
Suppress the French accent. Example 'Déjà présent' -> 'Deja present'

más de 4 años hace

Cargar más