Solved


prime test
find largest 2 digit prime number

5 months ago

Solved


Summing Rows and Columns
Create a matrix y of size (n+1) whose last column's elements are the summation of the elements of all the other columns and last...

5 months ago

Solved


means
Calculate the arithmetic, the geometric and the harmonic mean of a given vector (with positive elements) and return them in a ve...

5 months ago

Solved


Vector raised to a power, element-wise (★)
Given a vector A and a number x, raise each element of the vector to the power of x. Thus, if A = [2 5 7 1] and x = 0.5, then ...

5 months ago

Solved


Given a string s, find the length of the longest substring without repeating characters.
Given a string s, find the length of the longest substring without repeating characters. Example 1: Input: s = "abcabcbb" O...

5 months ago

Solved


Must be in the front row...
You are given a matrix followed by a single number. Your object is to write a script that will shift the matrix around so that ...

5 months ago

Solved


Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...

5 months ago

Solved


A matrix of extroverts
Now that the introverts have had their script, the extroverts spoke up (naturally!) and demanded one as well. You will be given...

5 months ago

Solved


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

5 months ago

Solved


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

5 months ago

Solved


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

5 months ago

Solved


most frequent character
Obtain the most frequent character. For example, s='balaram'; output='a'; If there is a tie between letters, return t...

5 months ago

Solved


Split a given string from the first instance of a given character
A simple operation to split a given string into two substrings at the point where the desired character is first found. e.g. ...

5 months ago

Solved


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

5 months ago

Solved


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

5 months ago

Solved


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

5 months ago

Solved


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

5 months ago

Solved


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

5 months ago

Solved


Ackermann's Function
Ackermann's Function is a recursive function that is not 'primitive recursive.' <http://en.wikipedia.org/wiki/Ackermann_fun...

5 months ago

Solved


Hermite Polynomials
Return the _n_-th <http://en.wikipedia.org/wiki/Hermite_polynomials Hermite polynomial> of the physicists' type. Assume that ...

5 months ago

Solved


Generalized Laguerre polynomials
Given an integer _n_ &ge; 0 and a scalar _a_, generate the _n_-th <http://en.wikipedia.org/wiki/Laguerre_polynomials#Generalized...

5 months ago

Solved


Laguerre polynomials
Given an integer _n_ &ge; 0, generate the _n_-th <http://en.wikipedia.org/wiki/Laguerre_polynomials Laguerre polynomial>. *Ex...

5 months ago

Solved


Radial Zernike polynomials
Given an integer _n_ &ge; 0 and an integer _m_ &ge; 0, generate the <http://en.wikipedia.org/wiki/Zernike_polynomials radial Zer...

5 months ago

Solved


Chebyshev polynomials of the 2nd Kind
Given an integer _n_ &ge; 0, generate the _n_-th <http://en.wikipedia.org/wiki/Chebyshev_polynomials Chebyshev polynomial of the...

5 months ago

Solved


Rosenbrock's Banana Function and its derivatives
Write a function to return the value of <http://en.wikipedia.org/wiki/Rosenbrock_function Rosenbrock's two-dimensional banana fu...

5 months ago

Solved


Decimation - Optimized for speed
This problem is similar to http://www.mathworks.com/matlabcentral/cody/problems/1092-decimation, only this time the score will b...

5 months ago

Solved


Set a diagonal
Given a matrix M, row vector v of appropriate length, and diagonal index d (where 0 indicates the main diagonal and off-diagonal...

5 months ago

Solved


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

5 months ago

Solved


Decimation
When dealing to the Roman Army, the term decimate meant that the entire unit would be broken up into groups of ten soldiers, and...

5 months ago

Solved


Count consecutive 0's in between values of 1
So you have some vector that contains 1's and 0's, and the goal is to return a vector that gives the number of 0's between each ...

5 months ago

Load more