Solved


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

8 years ago

Solved


Forward Substitution
Solve a lower triangular linear set of equations as described in the following link: http://www.people.virginia.edu/~teh1m/cody/...

8 years ago

Solved


Convert a number to its Roman representation
Convert a given number to its Roman representation. For example, if the number is 98, it should display 'XCVIII'

8 years ago

Solved


Matrix game: Winner takes all
Given a matrix A, return a new matrix of the same size in which the biggest element of each column in A takes 1, and 0 for all t...

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

8 years ago

Solved


X plus binary inverted x
Given a n-bits number x, what is the sum of x to the binary inverted version of x? (this might be more simple than you think :-)...

8 years ago

Solved


Can we make a triangle?
Given three positive number, check whether a triangle can be made with these sides length or not. remember that in a triangle su...

8 years ago

Solved


Kurchan Square - Evaluation Function
Evaluate a Kurchan square. An NxN square with values 1:N^2. Given a square matrix determine the products of each row, column,...

8 years ago

Solved


Vector multiplication
Given two row vectors, v1 and v2, each representing an integer, such that the vector elements are the digits from left to right,...

8 years ago

Solved


Repeat string n times - 2
This is the two variable version of <http://www.mathworks.com/matlabcentral/cody/problems/42482-repeat-string-n-times Repeat str...

8 years ago

Solved


Return the length of the longest word in the string.
Example: Input s='A fractal is a natural phenomenon or a mathematical set that exhibits a repeating pattern that display...

8 years ago

Solved


Non trivial identities - flipping
Return x by flipping it.

8 years ago

Solved


Integrate Me
Given polynomial, output the integral (with k = 1 for simplicity purposes) Example: input = [2 1] % 2x+1 output = [1 1 1]...

8 years ago

Solved


sum of ASCII
Given a string x, return the sum of all ASCII numbers of all characters. for example, if x='lala' ('l'-> 108, 'a'->97) then y...

8 years ago

Solved


Generalized N-Cards Problem
Preface: This is a generalized version of the problem I presented <http://www.mathworks.com/matlabcentral/cody/problems/271-n-ca...

8 years ago

Solved


Find unique number in input
Find value that occurs in odd number of input elements.

8 years ago

Solved


Convert a grayscale image into RGB colour format, preserving data type
In the Image Processing Toolbox, MATLAB provides rgb2gray to convert a 3 channel color image into a 1 channel intensity...

8 years ago

Solved


Check if a string starts with another string
Input s='He was so tired' q='He' Output ans = true

8 years ago

Solved


Angle difference between Hour Hand and Minute Hand of clock
*Calculate the difference of angles between Hour hand and Minute hand of clock* E.g. 1) At 12:00 Angle Difference = 0 deg...

8 years ago

Solved


Two dimensional moving average
A=[1 2 3 4 5 1 2 2 2 3 2 3 3 3 4 1 1 4 4 2] B=[1 1;1 1]; % This is can be used for weight factor of moving a...

8 years ago

Solved


String Delimination and Outputting
In this problem, take an incoming string and deliminate the string based on spaces. Output the first string in between the space...

8 years ago

Solved


Insert Special character in character cell array.
input={'a','b','c'} then ans={'a','*','b','*','c'}

8 years ago

Solved


How to calculate the length of a triangle's side given two angles and one side
You are given a triangle with angles alpha, beta and gamma and sides a opposite alpha, b opposite beta and c opposite gamma. ...

8 years ago

Solved


Young's modulus
Given a value of <http://en.wikipedia.org/wiki/Young_modulus Young's modulus> (Y) expressed on MegaPascal, convert it to the uni...

8 years ago

Solved


Vector addition
Given two row vectors, v1 and v2, each representing an integer, such that the vector elements are the digits from left to right,...

8 years ago

Solved


Find the binary code
Given a sinusoidal signal, create a function that returns the binary code of a quantized value. The function takes the bit lengt...

8 years ago

Solved


Calculate the h-index
H-index is a powerful tool for quantifying the scientific contribution of a researcher. H-index is defined as follows (source - ...

8 years ago

Solved


Multiply Column
Given two input, one matrix and one scalar number For example A is a matrix given A = [ 1 2 2 5 2 5 2 3 4 6...

8 years ago

Solved


Number of paths on a grid
Consider a grid formed by n vertices vertically down, and m vertices horizontally right. Your starting point is at the top lef...

8 years ago

Solved


Map all the indices of an Array Indices into a Vector giving Index vs Row and Column
Create an array of the row and column values for the indices of an array. This is typically performed using [r c]=ind2sub(siz...

8 years ago

Load more