문제를 풀었습니다


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

10년 초과 전

문제를 풀었습니다


Switch matrix to a column vector
for e.g. x = [1 2 3 4] y = 1 3 2 4

10년 초과 전

문제를 풀었습니다


Possible Outcomes of American Roulette
The payout for American roulette can be calculated by: payout = (38/n)-1 where n is the number of squares the bet covers. ...

10년 초과 전

문제를 풀었습니다


Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...

10년 초과 전

문제를 풀었습니다


07 - Common functions and indexing 6
Create a variable _m_ as a magic square with the size 6 x 6 Magic squares are defined as square matrices, where the sum of a...

10년 초과 전

문제를 풀었습니다


03 - Matrix Variables 6
Make _fMat_ be a 5x3 matrix of random integers with values from -3 to 3 (Hint: use *randi*)

10년 초과 전

문제를 풀었습니다


Mode
Find the mode of the vector Assumption: no vector is bimodal Example 1: input=[1 2 3 4 4]; output=4 Example 2: input=[7...

10년 초과 전

문제를 풀었습니다


Create a matrix with difference of each row of input matrix
With a given input matrix A, create a output matrix B in such a way that each row in B is a difference of rows of input matrix A...

10년 초과 전

문제를 풀었습니다


Binary
Given a positive, integer n, create a function that returns the respective binary number in the form of a vector. Example: ...

10년 초과 전

문제를 풀었습니다


Signed Magnitude
For a given input vector, return the value that is furthest from zero. For example, if x = [1 2 -12] return -12.

10년 초과 전

문제를 풀었습니다


Find nth maximum
Find nth maximum in a vector of integer numbers. Return NaN if no such number exists. x = [2 6 4 9 -10 3 1 5 -10]; So ...

10년 초과 전

문제를 풀었습니다


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

10년 초과 전

문제를 풀었습니다


Poker Series 04: isFlush
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is t...

10년 초과 전

문제를 풀었습니다


CARDS PROBLEM
Read my mind and tell me the card number that I have now in my hands.

10년 초과 전

문제를 풀었습니다


Add a row of zeros on top of a matrix
Given a matrix, insert a row of zeros as the top row.

10년 초과 전

문제를 풀었습니다


How many days does the cat take to climb out of the hole?
A cat accidentally falls down a hole with sloping but rough sides. It can climb out of the hole of height h metres, but for ever...

10년 초과 전

문제를 풀었습니다


Sophie Germain prime
In number theory, a prime number p is a *Sophie Germain prime* if 2p + 1 is also prime. For example, 23 is a Sophie Germain prim...

10년 초과 전

문제를 풀었습니다


Count decimal digits of a number
* Given an integer number you have to return the number of its digits. * For example 248 has 3 digits and 1589 has 4 digits ...

10년 초과 전

문제를 풀었습니다


Remove element(s) from cell array
You can easily remove an element (or a column in any dimension) from a normal matrix, but assigning that value (or range) empty....

10년 초과 전

문제를 풀었습니다


Determine if input is a perfect number
A <http://en.wikipedia.org/wiki/Perfect_number/ perfect number> occurs whent the sum of all divisors of a positive integer, exce...

10년 초과 전

문제를 풀었습니다


Create an index-powered vector
Given a input vector x, return y as index-powered vector as shown below. Example x = [2 3 6 9] then y should be [...

10년 초과 전

문제를 풀었습니다


Negative matrix
Change the sign of all elements in given matrix.

10년 초과 전

문제를 풀었습니다


Area of rhombus
Calculate the rhombus area

10년 초과 전

문제를 풀었습니다


System of equations
Find a solution to a system of equations represented by a |n| by |n+1| matrix. For instance, [ 2 0 4; => 2*x = 4 ...

10년 초과 전

문제를 풀었습니다


Free passes for everyone!
_Simply return the name of the coolest numerical computation software ever_ *Extra reward* (get a _freepass_): As an addit...

10년 초과 전

문제를 풀었습니다


Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
The given function returns the index of the maximum value in a given matrix. such as X=[4,3,4,5,9,12,0,5] Ans= 6 if maxim...

10년 초과 전

문제를 풀었습니다


Multielement indexing of a row array
The row array birthRateChina stores the China birth rate (per 1000 people) for years 2000 to 2012. Write a statement that create...

10년 초과 전

문제를 풀었습니다


frame of the matrix
Given the matrix M, return M without the external frame.

10년 초과 전

문제를 풀었습니다


Square Digits Number Chain Terminal Value (Inspired by Project Euler Problem 92)
Given a number _n_, return the terminal value of the number chain formed by summing the square of the digits. According to the P...

10년 초과 전

문제를 풀었습니다


subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

10년 초과 전

더 보기