문제를 풀었습니다


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

12년 초과 전

문제를 풀었습니다


Create a row array using double colon operator
Create a row array from 9 to 1, using the double colon operator.

12년 초과 전

문제를 풀었습니다


Three grind is shipsstraigt
A function that returns either 'Rock', 'Scissors', or 'Paper' (string). You may succeed or you may fail the (case insensitive) t...

12년 초과 전

문제를 풀었습니다


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

12년 초과 전

문제를 풀었습니다


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

12년 초과 전

문제를 풀었습니다


Maintain shape of logical-index mask
When using logical indexing into an array, MATLAB returns a vector output. For example, if A = magic(3); mask = logi...

12년 초과 전

문제를 풀었습니다


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

12년 초과 전

문제를 풀었습니다


mathematics , probability problem
How many different result can we have, rolling k dice?

12년 초과 전

문제를 풀었습니다


Sum the elements in either diagonal of a square matrix
Sum the elements of a square matrix that lie on either the major diagonal or anti-diagonal.

12년 초과 전

문제를 풀었습니다


commutative?
Given the handle to a binary function that takes two ordinary numbers, test if the function is commutative.

12년 초과 전

문제를 풀었습니다


root?
* Given a function 'foo', and a position 'there', find the root near 'there'. * For example: If foo=@sin, and there=3.1, then r...

12년 초과 전

문제를 풀었습니다


Determine if input is a Narcissistic number
<http://en.wikipedia.org/wiki/Narcissistic_number Narcissistic number> is a number that is the sum of its own digits each raised...

12년 초과 전

문제를 풀었습니다


Close MATLAB with keyboard
Close MATLAB with keyboard without using mouse

12년 초과 전

문제를 풀었습니다


Accessing elements on the diagonal
Access the diagonal elements of a matrix without 'diag' function

12년 초과 전

문제를 풀었습니다


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

12년 초과 전

문제를 풀었습니다


Volume of a Parallelepiped
Calculate the volume of a Parallelepiped given the vectors for three edges that meet at one vertex. A cube is a special case ...

12년 초과 전

문제를 풀었습니다


Center of mass
Given a matrix M(m,n), where m is the number of vertices of the geometrical element and n is 2 or 3 (2D-plane figure or 3D-solid...

12년 초과 전

문제를 풀었습니다


Split a string into chunks of specified length
Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...

12년 초과 전

문제를 풀었습니다


Ordinal numbers
Given an integer n, return the corresponding ordinal number as a character string. For example, ord(1)='1st' ord(2)=...

12년 초과 전

문제를 풀었습니다


Permute diagonal and antidiagonal
Permute diagonal and antidiagonal For example [1 2 3;4 5 6;7 8 9] -> [3 2 1;4 5 6;9 8 7] WITHOUT diag function (and variable n...

12년 초과 전

문제를 풀었습니다


sum of first 'n' terms
Given n=10, find the sum of first 'n' terms Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these n=10 terms is 55...

12년 초과 전

문제를 풀었습니다


Solving a quadratic equation
Given a, b ​​and c, Return the solution of the following quadratic equation: a*x^2 + b*x + c = 0.

12년 초과 전

문제를 풀었습니다


Remove entire row and column in the matrix containing the input values
Remove the entire row and column from the matrix containing specific values. The specified value can be a scalar or a vector. Fo...

12년 초과 전

문제를 풀었습니다


Convert Hard Drive marketing sizes to actual data sizes
Hard drive sizes are typically marketed using the decimal meaning of prefixes, whereas RAM uses binary meanings. For example: ...

12년 초과 전

문제를 풀었습니다


random picture with random colours
write a function which creates a random(x,y) matrix with random RGB colours for example create_pic(5,5) gives us a 3d matrix. ...

12년 초과 전

문제를 풀었습니다


Add more zeros
Find code that adds one 0 to each sequence of 0 in a string (composed with only 0 or 1). For example: '1010' -> '100100' ...

12년 초과 전

문제를 풀었습니다


Wilf-Zeilberger pairs
Take as inputs two functions _F_ and _G_, and two scalar values _n_ and _k_. Test whether the functions are candidates to be a W...

12년 초과 전

문제를 풀었습니다


Matrix with different incremental runs
Given a vector of positive integers a = [ 3 2 4 ]; create the matrix where the *i* th column contains the vector *1:a(i)...

12년 초과 전

문제를 풀었습니다


Create a matrix X, where each column is a shifted copy of the vector v
Example : in->v = (1:5)'; 1 2 3 4 5 out-> [1 5 4 3 2;2 1 5 4 3;3 2 1 5 4;4 3 2 1 5;5 4 3 ...

12년 초과 전

문제를 풀었습니다


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

12년 초과 전

더 보기