Solved


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

3 months ago

Solved


Addition Partition
You will be given two numbers, N and K. Write a MATLAB function that will determine how many different unique ways you can have...

3 months ago

Solved


Penny Distribution Machine
A machine consists of a row of boxes. To start, one places N pennies in the leftmost box. The machine then redistributes the pen...

3 months ago

Solved


Moving Product (Easy)
Given an input array A, write a function *movprod(A,k,dim)* to calculate the moving product over a sliding window of length *k* ...

3 months ago

Solved


Fill the matrix - 1
Input is a column vector and n. n columns will be added to the left of the input column. The first value of the row is the s...

3 months ago

Solved


Fill a rectangle with 1x1 and 2x2 tiles
A 3x2 rectangle can be filled with 1x1 and 2x2 tiles in three ways: The colors merely distinguish the sizes of the tiles. A 3...

3 months ago

Solved


Find the distance between runs
Another question inspired by the <http://uk.mathworks.com/matlabcentral/answers/?s_tid=gn_mlc_an answers forum>: A vector of ...

3 months ago

Solved


Red and green towers
Frankie has a large number of wooden cubes, painted in red and green. He is building little towers with his cubes, by stacking t...

3 months ago

Solved


Pancake sorting
Sort a stack of pancakes by flipping them using spatula. * There are _N_ pancakes with diameters _1:N_. * Spatula can be ins...

3 months ago

Solved


How close to a hole
Suppose you have a description of good places (ones) and bad places (zeros). You want to know your distance from a bad place (in...

3 months ago

Solved


Split array into pieces according to corresponding array
An array x of length n has values 1...m with each value appearing at least once. The values are sorted (n>=m). A second...

3 months ago

Solved


Find indices of diagonal elements
Given a matrix A and a diagonal index d (where 0 indicates the main diagonal and off-diagonals are identified by positive and n...

3 months ago

Solved


Check capital letters
Check if each first letter of a string is a capital letter. for example: 'This Is Ok' gives a true answer and 'This Is not Ok' ...

3 months ago

Solved


Find the rank of a matrix
Determine the rank of a matrix without using the MATLAB function of the same name.

3 months ago

Solved


Find Logic 5

3 months ago

Solved


Construct a string from letters and counts
Given two input arrays like this: [5,3,1] ['a','b','c'] Output a string that contains each letter the specified num...

3 months ago

Solved


Get the array of sum for three consecutive numbers in an array
Get the array of sum, for three consecutive numbers in an array. if Input 'x' does not have at-least 3 elements then 'y' shou...

3 months ago

Solved


Number Puzzle - 119

3 months ago

Solved


Wythoff Sequence
Find the lower Wythoff sequence up to n. For more information, <https://oeis.org/A000201>

3 months ago

Solved


Prime number check (★★)
One way to see if a number x is prime is to compute the remainders obtained when dividing x by all integers from 2 to √(x). If x...

3 months ago

Solved


Rotate matrix by coloumns

3 months ago

Solved


Integer to boolean
Write a general function that will create the following conversation; Input is a column vector with integers Output is a b...

3 months ago

Solved


Find the coefficient of a number in scientifc notation
Given a non-negative real number N, find the coefficient C and the exponent E of its scientific notation (N = C 10^E). Note that...

3 months ago

Solved


Numbers at bit-boundary
Find if a number is on or below the bit-boundary, as defined below. Examples 7,9 straddle the bit-boundary at 2^3 as do 31,32 ...

3 months ago

Solved


Decoding : Find the value
'u' in the function below is of type char or string and 'v' is of type int or double. function y = your_fcn_name( u, v) ...

3 months ago

Solved


Zero Out Negative Elements
Write a MATLAB function called zeroNegatives that takes a numeric vector v as input and returns a modified version where all neg...

3 months ago

Solved


Card Game
This is an overly simplified and highly modified version of card game Twenty-Nine. A deck of 100 unique cards (hypothetical) ...

4 months ago

Solved


Pizza order
A pizza order by phone in diameter d1, pizza will be make only in diameter d2. Return the pizza pieces p should be make.(pizza ...

4 months ago

Solved


Substring Extraction
In a given string, find the substring between Start_string and End_string. You will have to include or exclude the Start_str...

4 months ago

Solved


Avalaible area: wall construction
You need to build a wall to enclose a certain area. Calculate the available area after you build the wall. Assumptions * ...

4 months ago

Load more