Community Profile

# Danuanping

Last seen: 5 mesi fa Attivo dal 2017

Followers: 0   Following: 0

All

#### Feeds

Visto da

Risolto

Identify Reachable Points
Given a vector of 2-D Points and a vector of 2-D Deltas create an array of all Locations that can be reached from the points usi...

oltre 3 anni fa

Risolto

Wheat on a chessboard pt 2
If a chessboard were to have wheat placed upon each square such that x grains were placed on the first square and each successiv...

oltre 3 anni fa

Risolto

Wheat on a chessboard pt 1
If a chessboard were to have wheat placed upon each square such that one grain were placed on the first square and each successi...

oltre 3 anni fa

Risolto

N-Queens Checker
Picture a chessboard populated with a number of queens (i.e. pieces that can move like a queen in chess). The board is a matrix,...

oltre 3 anni fa

Risolto

Eight Queens Solution Checker
Write a function to verify whether an arrangement of queens on a chessboard is a valid solution to the classic <http://en.wikipe...

oltre 3 anni fa

Risolto

hanoi towers II
with 3 rods (1,2 & 3), the goal is to move a tower of n disks from rod #1 to rod #3. You can move disks only one by one, on the...

oltre 3 anni fa

Risolto

The Tower of Hanoi
In the <http://en.wikipedia.org/wiki/Tower_of_Hanoi Tower of Hanoi problem> with 3 rods (1, 2 & 3), the goal is to move a tower ...

oltre 3 anni fa

Risolto

Draw 'E'
Draw a x-by-x matrix 'E' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...

oltre 3 anni fa

Risolto

Draw a 'X'!
Given n as input Draw a 'X' in a n-by-n matrix. example: n=3 y=[1 0 1 0 1 0 1 0 1] n=4 y=[1 0 0...

oltre 3 anni fa

Risolto

Draw 'J'
Given n as input, generate a n-by-n matrix 'J' using 0 and 1 . Example: n=5 ans= [0 0 0 0 1 0 0 0 0 1 0 0 ...

oltre 3 anni fa

Risolto

Draw 'H'
Draw a x-by-x matrix 'H' using 1 and 0. (x is odd and bigger than 2) Example: x=5 ans= [1 0 0 0 1 1 0 0 0 1 ...

oltre 3 anni fa

Risolto

Draw a 'N'!
Given n as input, generate a n-by-n matrix 'N' using 0 and 1 . Example: n=5 ans= [1 0 0 0 1 1 1 0 0 1 1 0 ...

oltre 3 anni fa

Risolto

Draw 'C'.
Given x as input, generate a x-by-x matrix 'C' using 0 and 1. example: x=4 ans= [0 1 1 1 1 0 0 0 ...

oltre 3 anni fa

Risolto

Draw 'B'
Draw a x-by-x matrix 'B' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 0 1 0 0 0 1 ...

oltre 3 anni fa

Risolto

Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...

oltre 3 anni fa

Risolto

~~~~~~~ WAVE ~~~~~~~~~
|The WAVE generator| Once upon a time there was a river. 'Sum' was passing by the river. He saw the water of the river that w...

oltre 3 anni fa

Risolto

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.

oltre 3 anni fa

Risolto

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.

oltre 3 anni fa

Risolto

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

oltre 3 anni fa

Risolto

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

oltre 3 anni fa

Risolto

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

oltre 3 anni fa

Risolto

Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

oltre 3 anni fa

Risolto

Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

oltre 3 anni fa

Risolto

Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

oltre 3 anni fa

Risolto

Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

oltre 3 anni fa

Risolto

Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<https://i.imgu...

oltre 3 anni fa

Risolto

Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

oltre 3 anni fa

Risolto

Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

oltre 3 anni fa

Risolto

Return area of square
Side of square=input=a Area=output=b

oltre 3 anni fa

Risolto

Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

oltre 3 anni fa