Solved


Order of things - 2
This problem is closely related to <http://www.mathworks.nl/matlabcentral/cody/problems/2189-order-of-things-1 Problem 2189, Ord...

4 years ago

Solved


Order of things - 1
Let's assume you have a number of calculations to perform, that depend on each other. E.g. 'A' can be calculated, once the outco...

4 years ago

Solved


Bleed non-zeros to the right using REGEXP, and that sort of cheatcodess...
This one is quite similar to <http://www.mathworks.nl/matlabcentral/cody/problems/1998-bleed-non-zeros-to-the-right>. But thi...

4 years ago

Solved


Get the variable value from a string and generate sum
Get the variable value from a string. Example. x = 'A=10' y = 'B=20' Result = (x+y) Result = 30

4 years ago

Solved


Initialize a varible with an integer value from a another variable which is assigned with a character value.
Initialize a varible with an integer value from a another variable which is assigned with a character value. ex: Test = 'c'...

4 years ago

Solved


Create a "+" flag
Given two odd numbers, [m, n], return a matrix of size m x n which has all elements of the centre column and centre row set as 1...

4 years ago

Solved


Plotting Practice
Plot cos(x) vs x as shown in the figure below. Include the appropriate title, x-label, and y-label. Note, it is case sensitive. ...

4 years ago

Solved


Cross ("+") flag returns
Given two odd numbers, [m, n], return a matrix of size m x n which has all elements of the centre column and centre row set as 1...

4 years ago

Solved


Create the flag of Ramumbia
The little known nation of Ramumbia has a very simple flag. It is made up of vertical stripes, Red, Green, Blue, that are equall...

4 years ago

Solved


Scrabble Scores - 7
This problem is part of a set of problems that successively develop a more sophisticated Scrabble scoring routine. The point dis...

4 years ago

Solved


Scrabble Scores - 6
This problem is part of a set of problems that successively develop a more sophisticated Scrabble scoring routine. The point dis...

4 years ago

Solved


Scrabble Scores - 5
This problem is part of a set of problems that successively develop a more sophisticated Scrabble scoring routine. The point dis...

4 years ago

Solved


Scrabble Scores - 4
This problem is part of a set of problems that successively develop a more sophisticated Scrabble scoring routine. The point dis...

4 years ago

Solved


convert 2D array of ones and zeros to checkerboard array of [1,2] where the original array was ones and zero elsewhere
Given a 2D array of ones and zeros, generate an equivalent sized checkerboard array of ones and twos. The checkerboard pattern s...

4 years ago

Solved


Rule of mixtures (composites) - either bound
The <http://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures> is used in the mechanical design of composite structures to...

4 years ago

Solved


Rule of mixtures (composites) - lower bound
The <http://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures> is used in the mechanical design of composite structures to...

4 years ago

Solved


Dick Van Dyck?
* Not the celebrity, <http://en.wikipedia.org/wiki/Dick_Van_Dyke Dick Van Dyke>, * this problem relates to balanced strings of...

4 years ago

Solved


Write a cubic formula function
Create a function that will output the three roots of a cubic equation specified by the 4 coefficients listed as input. The outp...

4 years ago

Solved


Sales Tax

4 years ago

Solved


Get the combinations
Consider p,q = 2 vectors of same or different length. Get a Output Array which has all the possible combinations of Elements o...

4 years ago

Solved


FIFA World Cup 2014 : Offside
This problem is about offside rule in football (soccer). Input is a matrix with mostly zeros and a few 1, 2, 3 and 4s. A zer...

4 years ago

Solved


Create a function handle that reverses the input arguments of another function handle
Given a function that takes two input arguments and returns one output, create another function handle that performs the same op...

4 years ago

Solved


Expression or variable?
Test if arguments of the function are all variables (workspace variables names). Return 1 if yes, 0 if no. For example : ...

4 years ago

Solved


Triple function composition
Given three functions f,g and h, create the composed function y=f(g(h)). Example f = @(x) x+1 g = @(x) x/2 h = @(x) ...

4 years ago

Solved


The Google Interview: Two Eggs Problem
Consider the following problem, a popular Google interview question: A firm has invented a super-strong egg. For publicity pu...

4 years ago

Solved


Calculate time taken by light to reach earth surface
We know the time(seconds) taken by light to reach surface of earth. What if the distance varies yearly or source of light moves ...

4 years ago

Solved


Compute average gain for some bets.
Given a vector containg the odds of some events in decimal format (e.g., |odds=[1.3 2.5 1.5]| ) and a vector of the same dimensi...

4 years ago

Solved


Basic Monte Carlo Simulation
Input is a matrix including service time and probability of service time. Another input is a random number. Function should tran...

4 years ago

Solved


Decrypt Polybius
Decrypt Polybius square. Please refer to Problem 1150 Polybius Square. input [13 33 14 51] output 'cody'; input [23 0 26 33 4...

4 years ago

Load more