A résolu


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

6 mois il y a

A résolu


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

6 mois il y a

A résolu


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

6 mois il y a

A résolu


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

6 mois il y a

A résolu


Draw a '1' in a zero matrix!

6 mois il y a

A résolu


Create a vector
Create a vector from 0 to n by intervals of 2.

6 mois il y a

A résolu


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

6 mois il y a

A résolu


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

6 mois il y a

A résolu


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not to use d...

6 mois il y a

A résolu


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

6 mois il y a

A résolu


Find max
Find the maximum value of a given vector or matrix.

6 mois il y a

A résolu


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

6 mois il y a

A résolu


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

6 mois il y a

A résolu


Simple Caesar Cypher - shift encrypt a message given an index number
A Caesar cypher is a simple shift encryption method. Your goal is to create a function that allows a user to input a string and ...

6 mois il y a

A résolu


Flip the diagonal values
Write a program that flip the elements of main diagonal , upper and lower diagonal values of a sqare matrix. For example if a ...

6 mois il y a

A résolu


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

6 mois il y a

A résolu


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

6 mois il y a

A résolu


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

6 mois il y a

A résolu


Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

6 mois il y a

A résolu


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

6 mois il y a

A résolu


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

6 mois il y a

A résolu


ZigZag matrix with reflected format
ZigZag MATRIX with REFLECTED format. We have only input x. We have to create a matrix in the following pattern. input n=5...

6 mois il y a

A résolu


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

6 mois il y a

A résolu


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

6 mois il y a

A résolu


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

6 mois il y a

A résolu


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

6 mois il y a

A résolu


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

6 mois il y a

A résolu


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

6 mois il y a

A résolu


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

6 mois il y a

A résolu


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

6 mois il y a

Charger plus