문제를 풀었습니다


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

4년 초과 전

문제를 풀었습니다


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

4년 초과 전

문제를 풀었습니다


"mirror" matrix
Create n x 2n "mirror" matrix of this type: Examples For n = 2 m = [ 1 2 2 1 1 2 2 1 ] For n = 3 m = ...

4년 초과 전

문제를 풀었습니다


Square root of number
Square root of given number.

4년 초과 전

문제를 풀었습니다


Perfect Square or not
find Given input x is perfect square or not,if yes then output y=1.else y=0

4년 초과 전

문제를 풀었습니다


Add two numbers
Given a and b, return the sum a+b in c.

4년 초과 전

문제를 풀었습니다


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

4년 초과 전

문제를 풀었습니다


Power supply: 230V to 115V
The problem is simple: we have a wall outlet which supplies 230V and an apparatus that requires 115V. Software is always chea...

4년 초과 전

문제를 풀었습니다


Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

4년 초과 전

문제를 풀었습니다


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

4년 초과 전

문제를 풀었습니다


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

4년 초과 전

문제를 풀었습니다


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...

4년 초과 전

문제를 풀었습니다


Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3

4년 초과 전

문제를 풀었습니다


Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

4년 초과 전

문제를 풀었습니다


Matrix to column conversion
Given a matrix of any size, convert it into a column vector. e.g A=[10 20 30; 40 50 60] then, B = [10; 40; ...

4년 초과 전

문제를 풀었습니다


Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

4년 초과 전

문제를 풀었습니다


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

4년 초과 전

문제를 풀었습니다


Square a Number
Given an input x, return y, which is equal to the square of x.

4년 초과 전

문제를 풀었습니다


Remove the Zero
Given an array n, remove all zeros

4년 초과 전

문제를 풀었습니다


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

4년 초과 전

문제를 풀었습니다


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

4년 초과 전

문제를 풀었습니다


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

4년 초과 전