Gelöst


Find the index of n in magic(n)
If input n=5, then magic(n) is 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22...

mehr als ein Jahr vor

Gelöst


Replace pattern 0 1 0 and 1 0 1
Find and replace a pattern in a row of zeroes and ones. * Find 1 0 1 and replace it with 1 1 1 * Find 0 1 0 and replace it w...

mehr als ein Jahr vor

Gelöst


Time Expansion
How can you slow down any discrete-time signal? Example Input original signal x. x = [1 2 3 -1 -2 -5 -4] We want t...

mehr als ein Jahr vor

Gelöst


counting groups!
This problem is about counting groups. Example If you have x: x = [0.8 0.8 0.8 0.3 0.3 0.4 0.5 0.6 0.6 0.9] then a...

mehr als ein Jahr vor

Gelöst


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

mehr als ein Jahr vor

Gelöst


Max Change in Consecutive Elements
If an array is given as input then find the index of consecutive elements that represent maximum change. Example: Input ...

mehr als ein Jahr vor

Gelöst


remove single elements
Given a vector of integers, remove the elements that have appeared only once. The output elements should be in exact order as th...

mehr als ein Jahr vor

Gelöst


Produce the following matrix
Produce the following matrix x = [2 3 4] y_correct = [1 1/2 1/3; 2 1 1/4; 3 4 1];

mehr als ein Jahr vor

Gelöst


Make a diamond
Given n, odd number > 1, return n by n matrix consist of "null" and "*" characters arranged like a diamond. No toolbox funct...

mehr als ein Jahr vor

Gelöst


Some Assembly Required
The input to this function is a matrix of real numbers. Your job is to assemble the rows of the matrix into one large row that ...

mehr als ein Jahr vor

Gelöst


Dice face matrix!
This is dice simulator, but instead of making a random die number, you will receive an "pre-rolled" number in and spit out a mat...

mehr als ein Jahr vor

Gelöst


Check if a matrix is a palindrome in all directions
Check if a matrix is a palindrome both vertically and horizontally. You function will return *true* for |[1,2,1]| or |[2,7,2;...

mehr als ein Jahr vor

Gelöst


Form a square matrix from four square sub-matrices
Create a square matrix, y, from 4 square sub-matrices that will be constructed (x1, x2, x3, x4): y = [x1 x2; x3 x4]; ...

mehr als ein Jahr vor

Gelöst


Create a square matrix with given conditions
Create a square matrix, M, which should be populated as follows: M = [ n^2 n * (n-1) n * (n-2) ... n * 2 n * ...

mehr als ein Jahr vor

Gelöst


create a square matrix
create a [n*n] matrix. example: mat(4)= [ 1 4 9 16 4 4 9 16 9 9 ...

mehr als ein Jahr vor

Gelöst


Tent matrix
Create an n x n matrix that resembles one kind of tent. The variable n is provided to the function and will be an odd number. As...

mehr als ein Jahr vor

Gelöst


Vandermonde Matrix
Create the Vandermonde Matrix of the given vector. The matrix consists of columns as powers of the vector, so the first column i...

mehr als ein Jahr vor

Gelöst


Union Jack Matrix
Create a matrix of odd dimensions that has ones on both diagonals and dividing the matrix into 4 quadrants, resembling a square ...

mehr als ein Jahr vor

Gelöst


Make a rainbow matrix (follow-up to checkerboard matrix)
Given an integer n, make an n-by-n matrix as shown below. The a(1,1) should be 0. As we move away from the top-left, the number ...

mehr als ein Jahr vor

Gelöst


Diagonal Pattern
For a positive integer |n|, return an |nXn| matrix |mat| such that the value of each element in row |i| and column |j| is given ...

mehr als ein Jahr vor

Gelöst


Matrix Pattern 2

mehr als ein Jahr vor

Gelöst


Matrix Pattern 5

mehr als ein Jahr vor

Gelöst


Matrix Pattern 6

mehr als ein Jahr vor

Gelöst


Matrix Pattern 7

mehr als ein Jahr vor

Gelöst


Matrix Pattern 8

mehr als ein Jahr vor

Gelöst


Matrix Pattern 9

mehr als ein Jahr vor

Gelöst


Matrix Pattern 10

mehr als ein Jahr vor

Gelöst


Remove multiples of N
in the vector x remove all multiples of N. x = [1 2 3 4 5 6]; N = 2; Then y = [1 3 5];

mehr als ein Jahr vor

Gelöst


String Logic 4
Example: 'CAT' --> 'IGZ' 'DOG' --> 'JUM' 'MATLAB' --> 'SGZRGH' 'ROSY' --> 'XUYE' 'TRUST' --> 'ZXAYZ' 'MOSTLY' --> 'SUYZ...

mehr als ein Jahr vor

Gelöst


Find Logic 2

mehr als ein Jahr vor

Mehr laden