A résolu


Draw 'F'
Draw a x-by-x matrix 'F' 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 ...

plus d'un an il y a

A résolu


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

plus d'un an il y a

A résolu


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

plus d'un an il y a

A résolu


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

plus d'un an il y a

A résolu


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

plus d'un an il y a

A résolu


Draw a 'Z'.
Given _n_ as input, generate a n-by-n matrix like 'Z' by _0_ and _1_ . Example: n=5 ans= [1 1 1 1 1 0 0 0 1 ...

plus d'un an il y a

A résolu


Find Logic 29

plus d'un an il y a

A résolu


Draw a '4' in a zero matrix!

plus d'un an il y a

A résolu


Draw a '6' in a zero matrix!

plus d'un an il y a

A résolu


Draw a '9' in a zero matrix!

plus d'un an il y a

A résolu


Draw a '7' in a zero matrix!

plus d'un an il y a

A résolu


Draw a '8' in a zero matrix!

plus d'un an il y a

A résolu


Draw a '2' in a zero matrix!

plus d'un an il y a

A résolu


Draw a '5' in a zero matrix!

plus d'un an il y a

A résolu


Find x rows where the sum of the numbers is the maximum
Find x rows where the sum of the numbers is the maximum. For example: when x is 2 and m is 2 3 5 0 2 3 5 5 6 0 9 4 then y =...

plus d'un an il y a

A résolu


Draw a '1' in a zero matrix!

plus d'un an il y a

A résolu


Maximum of each diagonal
The well-known <http://www.mathworks.com/help/matlab/ref/max.html max> function can operate along either the rows or the columns...

plus d'un an il y a

A résolu


Minimum of each diagonal
The well-known <http://www.mathworks.com/help/matlab/ref/min.html min> function can operate along either the rows or the columns...

plus d'un an il y a

A résolu


Flip the main diagonal of a matrix
Given a n x n matrix, M, flip its main diagonal. Example: >> M=magic(5); >> flipDiagonal(M) 9 24 1 ...

plus d'un an il y a

A résolu


Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row. This also applies...

plus d'un an il y a

A résolu


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input is n=4 th...

plus d'un an il y a

A résolu


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

plus d'un an il y a

A résolu


Find Logic 28

plus d'un an il y a

A résolu


Find Logic 24

plus d'un an il y a

A résolu


Find Logic 21

plus d'un an il y a

A résolu


Find Logic 9
Guess the Logic! logic(1) = 4 logic(2) = 1 logic(3) = 10 logic(4) = 2

plus d'un an il y a

A résolu


Find Logic 15

plus d'un an il y a

A résolu


Find Logic 14
Guess the Logic! logic(1) = 100 logic(2) = 96 logic(3) = 105 logic(4) = 89 logic(5) = 114 Make a function logic(x) which w...

plus d'un an il y a

A résolu


Find Logic 16

plus d'un an il y a

A résolu


Find Logic 17

plus d'un an il y a

Charger plus