Gelöst


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

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Gelöst


Make a Plot with Functions
Make a plot and test

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Gelöst


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.

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Mehr laden