Solved

Get the elements of diagonal and antidiagonal for any m-by-n matrix

In the problem <http://www.mathworks.com/matlabcentral/cody/problems/858-permute-diagonal-and-antidiagonal Problem 858. Permute ...

1 year ago

Solved

Replicate elements in vectors

Replicate each element of a row vector (with NaN) a constant number of times. Examples n=2, A=[1 2 3] -> [1 1 2 2 3 3] ...

1 year ago

Solved

Return a list sorted by number of consecutive occurrences

Inspired by Problem 38 by Cody Team. Given a vector x, return a vector y of the values in x sorted by the number of CONSECUTIVE...

1 year ago

Solved

Create logical matrix with a specific row and column sums

Given two numbers *|n|* and *|s|*, build an |n-by-n| logical matrix (of only zeros and ones), such that both the row sums and th...

1 year ago

Solved

Generate N equally spaced intervals between -L and L

Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

1 year ago

Solved

intersection of matrices

Given two matrices filled with ones and zeros, determine if they share a common row, column entry. These matrices are of identi...

1 year ago

Solved

We love vectorized solutions. Problem 1 : remove the row average.

Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solution will be tested for ac...

1 year ago

Solved

Piecewise linear interpolation

Given an Mx2 vector and a row of M-1 integers, output a two column vector that linearly interpolates Y times between each succes...

1 year ago

Solved

Extract Built In Functions and Toolbox Functions from String or Function Handle

Find the Built-In functions and Toolbox functions in either a string or a function handle. Generate a string of alphabetized ...

1 year ago

Solved

Data decompression

A chunk of data is to be 'decompressed'. Input: * compressed: a row vector of uint8 values. This is the compressed data. ...

1 year ago

Solved

letter yes yes & letter no no

Split a string into two strings, wherein the first string has all alphabetic letters and the second string has all the remaining...

1 year ago

Solved

QWERTY Shift Code Decoder

Decode a string encoded using the QWERTY shift code. QWERTY shift code is where the message was touch typed but with an offse...

1 year ago

Solved

QWERTY Shift Encoder

Encode a string using the QWERTY shift code. This code is where you touch type but are offset by one character to the right. ...

1 year ago

Solved

Word Distance - Sum

Let's suppose that the distance of a word can be calculated by summing the differences between its letters, having assigned the ...

1 year ago