Solved


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

1 month ago

Solved


Rescale Scores
Each column (except last) of matrix X contains students' scores in a course assignment or a test. The last column has a weighted...

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


Convert float to base N
The matlab function dec2base converts a positive integer number to a specified base. Extend it so that it works with non intege...

1 month ago

Solved


Integer complexity (Large numbers)
Inspired by <http://www.mathworks.com/matlabcentral/cody/problems/42831-integer-complexity Problem 42831>, this problem aims to ...

1 month ago

Solved


Integer complexity
Given an array, n, of positive integers, return an array, c, of the same size, in which each element is the complexity of the co...

1 month ago

Solved


Number construction III
Given a positive integer, n, return a, b and c, such that 1. n = a^1.5+b^2.5+c^3.5 2. a, b and c are all positive integers...

1 month ago

Solved


Number construction II
Given a positive integer, n, return a, b, c and d, such that 1. n = a*2^b+c*3^d 2. a, b, c and d are all positive integers...

1 month ago

Solved


Number construction I
Given a positive integer, n, return a, b, c and d, such that 1. n = a*sqrt(b)+c*sqrt(d) 2. a, b, c and d are all positive ...

1 month ago

Solved


Find the gcm of n given values
Create a function that given n integer values greater than zero, finds the two numbers with the greatest common divisor and retu...

1 month ago

Solved


Convert integer to base26 using letters
Write a function that converts a decimal integer to base26 using the letters of the english alphabet, i.e. 0->'a', 1->'b', 2->'c...

1 month ago

Solved


Fill an array given a sum and array length values
Fill an array with random numbers so that their sum and array length will be equal to the given values as input. Function will g...

1 month ago

Solved


Binary Inversion
Given the unsigned 8-bit integer x, return the number y which is the binary inversion of x. For example if x is 5, y should b...

1 month ago

Solved


Make visible max values
Make visible maximum values of rows input = [1 2 3 4 5; 6 9 8 2 1; 2 1 4 5 8; 1 9 7 9 2]; ...

1 month ago

Solved


prime test
find largest 2 digit prime number

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

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

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

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

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

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

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

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

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

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

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

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

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

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

1 month ago

Load more