Solved

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

1 year ago

Solved

Draw 'I'

Given n as input, draw a n-by-n matrix 'I' using 0 and 1. example: n=3 ans= [0 1 0 0 1 0 0 1 0] n=...

1 year ago

Solved

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

1 year ago

Solved

Draw 'D'.

Draw a x-by-x matrix 'D' using 0 and 1. example: x=4 ans= [1 1 1 0 1 0 0 1 1 0 0 1 1 1 1 0]

1 year ago

Solved

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

1 year ago

Solved

Get all corner elements from a matrix where dimension of matrix is always equal to or greater than 2.

if a given matrix a = [1 2 3;4 5 6]; so answer is going to be [1 3;4 6]

1 year ago

Solved

For a given linear index as input for n sized square matrix, find corresponding row and column.

If input is 1, the row and column will be 1 and 1 respectively.

1 year ago

Solved

Output any real number that is neither positive nor negative

Output any real number that is neither positive nor negative

1 year ago

Solved

Create a square matrix of zeros of even order

Create a square matrix of zeros of even order

1 year ago

Solved

Speed of car

Calculate the Speed of car given its Distance travelled and time taken in x and y respectively

1 year ago

Solved

Multiply by 3

Given the variable x as your input, multiply it by three and put the result in y.

1 year ago

Solved

チェッカーボードを作ろう

整数 n が与えられた時、以下の様な1と0を含むn×nの行列を作成しましょう。a(1,1) は1にする必要があります。 例： 入力 n = 5 出力 a が [1 0 1 0 1 0 1 0 1 0 ...

1 year ago

Solved

Get the area of the square.

Four circles are inscribed in the square ABCD. The perimeter of each circle is *aπ*. <<http://imgfz.com/i/UzgCJut.png>> Gi...

1 year ago

Solved

Distance Between Points

Being n the number of points (If n = 3 there would be 3 points: A, B and C). The distance between each pair of points increases...

1 year ago

Solved

Set the array elements whose value is 13 to 0

Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

1 year ago

Solved

Is My Wife Wrong?

Answer the question. (see also <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right Problem 149: Is my ...

1 year ago

Solved

Distance a ball travels after throwing vertically

Calculate the total distance *'d'* (in meters) a ball would travel after *'s'* seconds and starting velocity of *'v'* (in m/s). ...

1 year ago

Solved

Convert Fahrenheit to Celsius

Calculate the Celsius temperature C given the Fahrenheit temperature F. Examples: Input F = 90 Output C is 32.22 I...

1 year ago

Solved

Concatenate matrix into 4 quadrants for given number of iteration

If given a matrix and number, output should be its concatenation like wavelet for given number of iterations. Example a ...

1 year ago

Solved

Create incrementing array

Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

1 year ago

Solved

Calculate value of capacitor

Given the value of resistance and time at which capacitor charges to it's 99%. calculate the value of capacitor

1 year ago

Solved

Tiling a matrix

Given a matrix and a number of columns, replicate matrix in a single row

1 year ago