A résolu


Choose group with people
How many ways can you choose n groups of n people from n^2 people, assuming the groups are distinct? The number of people i...

plus de 8 ans il y a

A résolu


Determine whether the input is divisible by 3 as well as 5
If the input is divisible by 3 as well as 5 then the output should be 'true' otherwise 'false'

plus de 8 ans il y a

A résolu


Portfolio diversification: choose your stocks !
we have the returns of 3 stocks for the last 4 years and we have to combine only 2 stocks that are less correlated. Example: ...

plus de 8 ans il y a

A résolu


5th Time's a Charm
Write a function that will return the input value. However, your function must fail the first four times, only functioning prope...

plus de 8 ans il y a

A résolu


Is this a valid Tic Tac Toe State?
For the game of <https://en.wikipedia.org/wiki/Tic-tac-toe Tic Tac Toe> we will be storing the state of the game in a matrix M. ...

plus de 8 ans il y a

A résolu


Change string to number
Change given string to number. (hint: there is already function) Changing from ['1234'] to [1234] is one of example

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


Decoder Ring
You are given a matrix of numbers, your objective is to use the decoder ring to find the hidden message. ex. encoded_messa...

plus de 8 ans il y a

A résolu


CONVERT TAN TO SIN
In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

plus de 8 ans il y a

A résolu


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

plus de 8 ans il y a

A résolu


Test Problem; Create a 5x5 array containing all ones
This is a test for learning the process of creating a Cody problem. The goal of this test problem will be to create an array,...

plus de 8 ans il y a

A résolu


What number has this problem?
This problem is added because it is problem number *???* in the "Community" problems section. <http://www.mathworks.de/matlab...

plus de 8 ans il y a

A résolu


Create matrix of replicated elements
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

plus de 8 ans il y a

A résolu


Gambler?
Given a handle to a wealth function, confirm within 100 milliseconds 'Millionaire', 'Likely', or 'Gambler', if wealth() returns ...

plus de 8 ans il y a

A résolu


Probability of red tulips
I hope to give you bulbs of tulip. But I do not know the color of those petals. I just know that the color is red, white or yell...

plus de 8 ans il y a

A résolu


Penny flipping - calculate winning probability (easy)
Two players are playing a fair penny flipping game. For each flip, the winner adds one penny from the loser's collection to his/...

plus de 8 ans il y a

A résolu


Finding an element in a vector
x is a vector of unknown length your function should return the index of the first element in the vector that is greater than...

plus de 8 ans il y a

A résolu


Test your luck!
This problem is designed to test your luck, and therefore the contents of your function are irrelevant. In order to do so, the t...

plus de 8 ans il y a

A résolu


Sample from random roulette
Given a list of values and their probabilities sample 10,000 values. Example: x = [1 2 3 4 5]; prob = [0.2 0.1 0.4 0....

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


Calculate the probability that at least two people in a group share the same birthday.
Calculate the probability that at least two people in a group share the same birthday. Given an integer input n, return to 0.015...

plus de 8 ans il y a

A résolu


Half?
If you toss an even number (x) of coins, what is the probability (y) of 50% head and 50% tail?

plus de 8 ans il y a

A résolu


Number of odd and even elements within matrix
Input(m) - any matrix with integers Output(n) - n(1)=number of odd elements, n(2)=number of even elements Example: * m=...

plus de 8 ans il y a

A résolu


Create an 8-color version of an image
This problem was inspired by a tweet I saw from @MATLAB regarding <http://www.mathworks.com/matlabcentral/fileexchange/37816-the...

plus de 8 ans il y a

A résolu


Find the biggest empty box
You are given a matrix that contains only ones and zeros. Think of the ones as columns in an otherwise empty floor plan. You wan...

plus de 8 ans il y a

A résolu


Given a window, how many subsets of a vector sum positive
Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

plus de 8 ans il y a

A résolu


Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row. This also applies...

plus de 8 ans il y a

A résolu


Duplicates
Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

plus de 8 ans il y a

A résolu


QWERTY coordinates
Given a lowercase letter or a digit as input, return the row where that letter appears on a standard U.S. QWERTY keyboard and it...

plus de 8 ans il y a

A résolu


Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

plus de 8 ans il y a

Charger plus