Solved

Create a code for XNOR
Given two inputs, output XNOR of those two

ungefär ett år ago

Solved

Rotate Matrix Depending on the input
Rotate matrix (CounterClockwise) via 90, 180 or -90 depending on the input Ex. a = [1 2 3; 4 5 6; 7 8 9] b = 90; ...

ungefär ett år ago

Solved

Odd times even numbers in a matrix
First count the number of odd numbers in x, then the number of even. Return their product. example: x = [1 2] One odd ...

ungefär ett år ago

Solved

Add only the even numbers of x example: x = [1 2 3 4 5] the positive numbers are: 2 4, so their sum is 6

ungefär ett år ago

Solved

Add only the positive numbers of x example: x = [-2 -1 0 1 2 3] the positive numbers are: 1 2 3, so their sum is 6

ungefär ett år ago

Solved

Find the volume of cone
Find the volume of cone, when given radius(r) and height(h).

ungefär ett år ago

Solved

Maximum of ND-array
Find the maximum element of a N dimensional array. Example: A=[1 2 4 ; -20 4 10]; The maximum is 10.

ungefär ett år ago

Solved

Construct a matrix whose elements begin from 1 and end at n^2 with the order of arrangement as shown below: For: n = 4 ...

ungefär ett år ago

Solved

Vector push
Append an element |x| to the end of the vector |v| and return both the extended vector and the new number of its elements. |x| c...

ungefär ett år ago

Solved

Triangle of numbers
Create a matrix with the integers from 1 to |n| arranged in a triangular shape. Every row |i| of the matrix contains |i| inte...

ungefär ett år ago

Solved

Find the best name there is for a nice guy
Try to come up with the best possible name for a nice and funny male person.

ungefär ett år ago

Solved

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

ungefär ett år ago

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

ungefär ett år ago

Solved

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

ungefär ett år ago

Solved

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

ungefär ett år ago

Solved

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

ungefär ett år 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=...

ungefär ett år 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 ...

ungefär ett år ago

Solved

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

ungefär ett år ago

Solved

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

ungefär ett år 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]

ungefär ett år 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 ...

ungefär ett år ago

Solved

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

ungefär ett år ago

Solved

Toeplitize a matrix
Similar to <http://www.mathworks.com/matlabcentral/cody/problems/3094-hankelize-a-matrix Problem 3094. Hankelize a matrix>, now ...

ungefär ett år ago

Solved

Write a function man that takes a row vector v and returns a matrix H as follows..
Write a function called man that takes a row vector v as an input and returns a matrix H whose first column consist of the eleme...

ungefär ett år ago

Solved

Hankelize a matrix
Similar to <http://www.mathworks.com/matlabcentral/cody/problems/42501-toeplitize-a-matrix Problem 42501. Toeplitize a matrix>, ...

ungefär ett år ago

Solved

Must be in the front row...
You are given a matrix followed by a single number. Your object is to write a script that will shift the matrix around so that ...

ungefär ett år ago

Solved

Go to the head of the class!
You're given a matrix and a single number. If that number is in the matrix, reorder the matrix so that number is in the first r...

ungefär ett år ago

Solved

Magnet and Iron
(Inspired from <http://www.mathworks.com/matlabcentral/cody/problems/112 Problem 112: Remove the air bubbles>) Iron (atomic n...

ungefär ett år ago

Solved

Replace Nonzero Numbers with 1
Given the matrix x, return the matrix y with non zero elements replaced with 1. Example: Input x = [ 1 2 0 0 0 ...

ungefär ett år ago