Gelöst


Calendar Matrix
Return a calendar matrix for the given values of month and year. Assume that Sunday is the first day of the week. The resulting ...

12 Monate vor

Gelöst


Rainbow matrix
Create a "rainbow matrix" as described in the following examples Input = 3 Output = [ 1 2 3 2 3 2 ...

12 Monate vor

Gelöst


Too Many Zeros, Dump Them!
Sometimes when I create a matrix, I use this syntax: a = zeros(1000,1000); But when the function ends, I find that I don'...

12 Monate vor

Gelöst


Enlarge array
Given an m-by-n numeric array (A) and a 1-by-2 vector (sz) indicating the dimensions [p q] to enlarge each element, return an (m...

12 Monate vor

Gelöst


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

12 Monate vor

Gelöst


Triangular matrices in 3D array
Given a 3D numeric array _x_, return an array _y_ of the same size in which all entries to the right of the main diagonal are ze...

12 Monate vor

Gelöst


Generate this matrix
Generate the following matrix. n = 2; out = [-4 -3 -2 -1 0 -3 -2 -1 0 1 -...

12 Monate vor

Gelöst


Toeplitz Matrix
For a given square matrix of order n-by-n check whether this is a Toeplitz matrix or not. Return true if it is.

12 Monate vor

Gelöst


Create a block diagonal matrix
A block diagonal matrix is a square matrix that can be written as A = [a 0 0 0 0 b 0 0 0 0 c 0 ...

12 Monate vor

Gelöst


Matrix Construction I
Given n, construct a matrix as shown in the example below. Example For n=8, the output should look like this: 1 2 3 4 ...

12 Monate vor

Gelöst


Morse Code Generator! Try it!
.... . .-.. .-.. --- . ...- . .-. -.-- --- -. . -.-.-- .-.. . - ... -.. --- ... --- -- . -- --...

12 Monate vor

Gelöst


Count letters occurence in text, specific to words with a given length.
Build a function with two input arguments: a string and a word length (number of letters), that outputs a vector of counts of th...

12 Monate vor

Gelöst


Backslang, odds are you used it at some point in time...
So backslang is a language that can be used to communicate in an easy decode code, if people know the rules of decoding it. Wel...

12 Monate vor

Gelöst


Join Strings with Multiple Different Delimiters
The idea is to form the string S by interleaving the elements of a cell array of strings DELIMITER and another cell array of st...

12 Monate vor

Gelöst


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

12 Monate vor

Gelöst


Given a matrix, swap the 2nd & 3rd columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

12 Monate vor

Gelöst


subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

12 Monate vor

Gelöst


Convert to Binary Coded Decimal
Convert from decimal representation to <http://en.wikipedia.org/wiki/Binary-coded_decimal Binary Code Decimal> (or BCD) represen...

12 Monate vor

Gelöst


Evened up (or not)
You will be provided with an array or matrix that contains various numbers, in addition to an evening variable, e, set to 1 or 0...

12 Monate vor

Gelöst


Convert Two Character String into a Binary Vector
Given a string "XOXXO" convert it into a binary vector. [1 0 1 1 0] Paul Berglund implemented an optimal method in <http://ww...

12 Monate vor

Gelöst


ABBREVIATION
Abbreviate the given string. Consider Only Capital Letters. EXAMPLE If input is 'Abbreviation of The Given String' then ou...

12 Monate vor

Gelöst


NO _________ ALLOWED....
So you're given a sentence where if there is a particular word in the sentence then the output is 1, if it is not there then the...

12 Monate vor

Gelöst


How many digits are there?
Input(s) - any string Output(n) - number of digits within string s

12 Monate vor

Gelöst


Make a list string
Given a cell string, produce a string separating the items with spaces and commas and with an 'and' preceding the final item, an...

12 Monate vor

Gelöst


Is the paranthesis sequence balanced ?
Quantum mechanics and computer science are interested in bra-kets. Today however you, the player, will have to write a function ...

12 Monate vor

Gelöst


Reference Index Number
Given a reference set R of elements (each unique but identical in type), and a list V of elements drawn from the set R, possibly...

12 Monate vor

Gelöst


Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

12 Monate vor

Gelöst


Change the sign of even index entries of the reversed vector
change the signs of the even index entries of the reversed vector example 1 vec = [4 -1 -2 9] ans = [9 2 -1 -4] example2...

12 Monate vor

Gelöst


Max index of 3D array
Given a three dimensional array M(m,n,p) write a code that finds the three coordinates x,y,z of the Maximum value. Example ...

12 Monate vor

Gelöst


Find nth maximum
Find nth maximum in a vector of integer numbers. Return NaN if no such number exists. x = [2 6 4 9 -10 3 1 5 -10]; So ...

12 Monate vor

Mehr laden