Solved


Set a Soroban Abacus
*Description* This problem is the inverse of <http://www.mathworks.com/matlabcentral/cody/problems/136-read-a-soroban-abacus ...

6 years ago

Solved


Whole Number Un-Concatenator
Write a function that accepts an integer and an index digit and returns a vector containing two integers which are the leading a...

6 years ago

Solved


Array ex-OR
There are in MATLAB logical functions such as _<http://www.mathworks.co.uk/help/matlab/ref/and.html and>,_ _<http://www.math...

6 years ago

Solved


Generalized Fibonacci
The Fibonacci sequence is defined as: Fib(1) = 0 Fib(2) = 1 Fib(N) = Fib(N-1) + Fib(N-2) The Fibonacci sequence ca...

6 years ago

Solved


persistant sum
There will be 9 tests for this problem. In each test you will be provided with 2 integers n=[n1,n2], where n2 is equal to t...

6 years ago

Solved


Distance between Berlin and New York in km
Use Pythagoras to calculate the distance between two locations in km (based on their respective longitudes and latitudes). Fo...

6 years ago

Solved


Get Cody's screen size
Return an object that helps this problem's test suite return Cody's screen size.

6 years ago

Solved


calculate the day of the year from a date string.
'09-Oct-2016' is the 283rd day of the year. So doy = dayoftheyear('09-Oct-2016') should return doy = 283

6 years ago

Solved


Subtract integers and add doubles
Create a function that subtracts a from b if a and b are integers and adds them if they are floats.

6 years ago

Solved


Find index of a string in a cell array
Write a function that finds the index at which the cell array of strings C contains the exact string S. So if C = {'twe...

6 years ago

Solved


Persistence will not help you solve this problem.
Create a function without inputs that adds one to the output every time it is called. A different possibility of solving this ha...

6 years ago

Solved


Persistence will help you solve almost any problem.
Create a function without inputs that adds one to the output every time it is called. a = counterfun; disp(a) >> 1 ...

6 years ago

Solved


time of day
Calculate the time of day in days, hours, minutes or seconds passed since the beginning of the day, depending on the unit. The u...

6 years ago

Solved


pizza deals
Given two pizza slices of different sizes: * Slice A with angle alpha1, radius r1, and price p1 * Slice B with angle alpha2,...

6 years ago

Solved


nanoseconds passed today
Calculate the amount of nanoseconds passed in the current day of a certain date string.

6 years ago

Solved


microseconds passed today
Calculate the amount of microseconds passed for a given date string. Return the value, rounded to the nearest integer, as a stri...

6 years ago

Solved


Translate German decimals to English decimals
The string 'x = [2,5; 5,5; 4,3];' should return 'y = [2.5; 5.5; 4.3];'

6 years ago

Solved


A little bit of luck needed
This one may require a little bit of guess work, but it is possible. Hints: - The same solution might fail the tests once and ...

6 years ago

Solved


Remove collinear points in a set of 2D points defining a polygon
Consider a polygon that is obtained by joining a set of 2D points whose coordinates are stored in matrix P=[x,y]. Write a functi...

6 years ago

Solved


Geometrical meaning of determinant
Given two vectors x,y, in 2D or three vectors x,y,z in 3D space, compute the area (or volume) of the parallelogram they define. ...

6 years ago

Solved


Non trivial identities - differentiation
Return x by differentiating it.

6 years ago

Solved


Non trivial identities - flipping
Return x by flipping it.

6 years ago

Solved


Non trivial identities - summation
Return x by adding a random number to it.

6 years ago

Solved


Non trivial identities - reshape
Return x by reshaping it.

6 years ago

Solved


A shooting competition
In a shooting competition, the target is a square of side L containing a circle of radius R<=L/2. A player scores one point if h...

6 years ago

Solved


Performance - summation
Given a vector of natural numbers x = [1,2,3,...,N] compute the sum of its elements by not stressing the machine too much...

6 years ago

Solved


Probabilities - Balls and urns - 02
The urn contains B blue balls and R red balls. Each trial consists of drawing one random ball from the urn and observing its col...

6 years ago

Solved


Probabilities - Balls and urns - 01
The urn contains B blue balls and R red balls. Each trial consists of drawing one random ball from the urn and observing its col...

6 years ago

Solved


Find 1's Complement
Find 1's complement of a binary number For Example: x = 10011010 1's complement of x = 01100101

6 years ago

Solved


With apologies to William Blake
Coder Coder, typing fast Sitting at your desk, aghast. What immortal MATLAB script will solve this problem, nice and qu...

6 years ago

Load more