Solved


Draw 'B'
Draw a x-by-x matrix 'B' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 0 1 0 0 0 1 ...

mer än 4 år ago

Solved


Verify Law of Large Numbers
If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....

mer än 4 år ago

Solved


Solve a System of Linear Equations
*Example*: If a system of linear equations in _x&#8321_ and _x&#8322_ is: 2 _x₁_ + _x₂_ = 2 _x₁...

mer än 4 år ago

Solved


Find the Oldest Person in a Room
Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...

mer än 4 år ago

Solved


Convert from Fahrenheit to Celsius
Given an input vector |F| containing temperature values in Fahrenheit, return an output vector |C| that contains the values in C...

mer än 4 år ago

Solved


Calculate Amount of Cake Frosting
Given two input variables |r| and |h|, which stand for the radius and height of a cake, calculate the surface area of the cake y...

mer än 4 år ago

Solved


Determine if input is a valid AHP evaluation matrix
Input is a matrix. Output is a true or false statement (1 or 0). Return true if input is a valid Analytic Hierarchy Process eval...

mer än 4 år ago

Solved


Projector Matrix
Write a function to determine whether or not the matrix is a projector. Projector matrices are defined as P^2 = P.

mer än 4 år ago

Solved


Orthonormal matrix
You decide whether any given matrix is an orthonormal matrix or not. If each column in a matrix is perpendicular to the other...

mer än 4 år ago

Solved


Probability of Choosing a Red Ball
Given two jars of red and blue balls, find the probability of choosing a red ball from Jar 1 after going through the steps. ...

mer än 4 år ago

Solved


Unique dice configurations
Given a number of dice N and the number of sides on each die S, write a MATLAB function that will output how many unique permuta...

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


Don't be mean. Be nice!
For this problem, you will be given a range of single digits R, and a separate number K. You job is to calculate the mean of al...

mer än 4 år ago

Solved


check whether a number is a pentatope number
<https://oeis.org/A000332>

mer än 4 år ago

Solved


generate nth pentatope number
https://en.wikipedia.org/wiki/Pentatope_number

mer än 4 år ago

Solved


find nth even fibonacci number
1st even fibonacci number=2 ; 2nd even fibonacci number=8 ..

mer än 4 år ago

Solved


Bell Triangle
Form the bell triangle upto nth bell number posotion; * if n=5 * y= [1 0 0 0 0; 1 2 0 0...

mer än 4 år ago

Solved


Frugal number
check whether n is a frugal number * a frugal number is a natural number in a given number base that has more digits than the...

mer än 4 år ago

Solved


Pell numbers
Find the nth pell number <https://en.wikipedia.org/wiki/Pell_number>

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


Iccanobif numbers 1
There are a lot of problems in Cody that deal with Fibonacci numbers (1, 1, 2, 3, 5, 8, 13, 21 etc...) so let's turn things arou...

mer än 4 år ago

Solved


Last non-zero digit
Given a number n, find the last non-zero digit of the factorial of that number. You need to take care of the large values of n....

mer än 4 år ago

Solved


Project Euler: Problem 18, Maximum path sum I
By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bott...

mer än 4 år ago

Solved


Sum of big primes without primes
Inspired by Project Euler n°10 (I am quite obviously a fan). With problem n°250 by Doug, you can find some global methods to ...

mer än 4 år ago

Solved


Snakes on a plane
Given the dimensions of a 2-d plane, create a matrix where a "snake" of ones occupies the plane from top left to bottom right. ...

mer än 4 år ago

Solved


Balanced Ternary Numbers: Easy as |, |-, |o
This problem concerns the so-called <http://en.wikipedia.org/wiki/Balanced_ternary balanced ternary> system for representing num...

mer än 4 år ago

Solved


Generating random matrix with given probability mass function
Inspired by <http://www.mathworks.com/matlabcentral/cody/problems/2356-simulating-the-selection-of-a-state-with-given-probabilit...

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


Create a random vector of integers with given sum
Your task today is to write a function that returns a vector of integer numbers, between, and including, 1 and m, of which the s...

mer än 4 år ago

Solved


Decrypt the cypher using XOR encryption (for beginners)
Inspired by Project Euler n°59 Each character on a computer is assigned a unique code and the preferred standard is ASCII (...

mer än 4 år ago

Load more