문제를 풀었습니다


N-th Odious
Given index n return n-th <https://oeis.org/A000069 odious number>.

거의 4년 전

문제를 풀었습니다


Find the 9's Complement
Find the 9's complement of the given number. An example of how this works is <http://electrical4u.com/9s-complement-and-10s-c...

거의 4년 전

문제를 풀었습니다


There are 10 types of people in the world
Those who know binary, and those who don't. The number 2015 is a palindrome in binary (11111011111 to be exact) Given a year...

거의 4년 전

문제를 풀었습니다


Converting binary to decimals
Convert binary to decimals. Example: 010111 = 23. 110000 = 48.

거의 4년 전

문제를 풀었습니다


Binary code (array)
Write a function which calculates the binary code of a number 'n' and gives the result as an array(vector). Example: Inpu...

거의 4년 전

문제를 풀었습니다


Relative ratio of "1" in binary number
Input(n) is positive integer number Output(r) is (number of "1" in binary input) / (number of bits). Example: * n=0; r=...

거의 4년 전

문제를 풀었습니다


Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

거의 4년 전

문제를 풀었습니다


Given an unsigned integer x, find the largest y by rearranging the bits in x
Given an unsigned integer x, find the largest y by rearranging the bits in x. Example: Input x = 10 Output y is 12 ...

거의 4년 전

문제를 풀었습니다


Find out sum and carry of Binary adder
Find out sum and carry of a binary adder if previous carry is given with two bits (x and y) for addition. Examples Previo...

거의 4년 전

문제를 풀었습니다


Convert given decimal number to binary number.
Convert given decimal number to binary number. Example x=10, then answer must be 1010.

거의 4년 전

문제를 풀었습니다


Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

거의 4년 전

문제를 풀었습니다


Spot the rectangle
This problem is related to the <http://bit-player.org/2009/the-17x17-challenge 17x17 challenge>. Given a matrix filled with ones...

대략 4년 전

문제를 풀었습니다


Spot the rectangle (Part 2)
This problem is related to the <http://bit-player.org/2009/the-17x17-challenge 17x17 challenge>. See also <http://www.mathworks....

대략 4년 전

문제를 풀었습니다


Spiral In
Create an m by n matrix filled with sequential integers starting from 1 and arranged in a counterclockwise spiral that hugs the ...

대략 4년 전

문제를 풀었습니다


Create a patchwork matrix
This function will assemble a large matrix out of a number of smaller ones m1, m2, etc., according to a pattern P. If P is 3x5,...

대략 4년 전

문제를 풀었습니다


Symmetric matrix
You must create a n-by-n *symmetric* matrix such that A(row,col) = row/col for col >= row. Example if n =3 : output is : ...

대략 4년 전

문제를 풀었습니다


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

대략 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년 전

문제를 풀었습니다


Make a Star Pyramid
Create a star pyramid. First line will have 1 star, second will have two stars and so on... a basic program which is easily done...

대략 4년 전

문제를 풀었습니다


Create a Multiplication table matrix...
Create a product table in this format: P = [ 1 2 3 4 5; 2 4 6 8 10; 3 6 9 12 15; 4 8 12 1...

대략 4년 전

문제를 풀었습니다


Make a logical diamond using GALLERY function
Inspired from <http://www.mathworks.com/matlabcentral/cody/problems/1078-make-a-diamond Problem 1078. Make a diamond> In thi...

대략 4년 전

문제를 풀었습니다


Special matrix
Make a square matrix with this shape. For n=4 M = 1 1 0 0 1 0 1 0 0 1 0 ...

대략 4년 전

문제를 풀었습니다


Mirror Image matrix across anti-diagonal
Given an input number x, create a mirror image matrix 'Y' across the anti-diagonal. For example, if x=3, Y = [1 2 3; ...

대략 4년 전

문제를 풀었습니다


Create Volcano (or Atoll) martix. It is an extension of Bullseye matrix problem.
For example, if n=2 (maximum value), the output matrix should be [1 1 1 1 1; 1 2 2 2 1; 1 2 1 2 1; 1 2 2 2 1; 1...

대략 4년 전

문제를 풀었습니다


Pascal's Matrix
Given an integer n &ge; 0, generate the ( _n_+1) &times; ( _n_+1) lower triangular <http://en.wikipedia.org/wiki/Pascal_matrix P...

대략 4년 전

문제를 풀었습니다


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

대략 4년 전

문제를 풀었습니다


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

대략 4년 전

문제를 풀었습니다


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

대략 4년 전

문제를 풀었습니다


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

대략 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년 전

더 보기