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

9 years ago

Solved


fractal circles
Create a fractal with circles using the same process as the Sierpinski triangle (https://en.wikipedia.org/wiki/Sierpinski_trian...

9 years ago

Solved


GJam March 2016 IOW: Clock Dance
This Challenge is derived from <http://code.google.com/codejam/contest/8274486/dashboard#s=p1 GJam March 2016 Annual I/O for Wom...

9 years ago

Solved


Project Euler: Problem 11, Largest product in a grid
What is the greatest product of _k_ adjacent numbers in the same direction (up, down, left, right, or diagonally) in a _n×n_ gri...

9 years ago

Solved


Solve t^(a*x^2+b*x+c)=s
Solve t^(a*x^2+b*x+c)=s. Return x vector as result. Example a=1, b=2, c=1, t=3, s=15. Result x(1)= 0.5700 x(2)=-2.5700 H...

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

9 years ago

Solved


How to devide each element of matrix a with matrix b of same size?
How to devide each element of matrix a with matrix b of same size?

9 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];'

9 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

9 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 :-)...

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

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

9 years ago

Solved


Return ! if array element starts with a certain letter. Otherwise return ?
Input x=['try' 'once' 'more']; s='t' Output ans='!' Input x=['try' 'once' 'more']; s='O' Output ...

9 years ago

Solved


Find area.
Suppose <<https://www.mathworks.com/help/examples/matlab/ImproperIntegralExample_eq17103907294130514984.png>> b=Inf. Fi...

9 years ago

Solved


How many figures currently exist?
Return the number of figures that exist at any given time.

9 years ago

Solved


String revert
Revert all words in a sting x for example, if x = 'this is a sentence' then y should be 'sentence a is this'

9 years ago

Solved


Convert a vector to a lower triangular matrix
I now have a row vector and I want to convert it to a lower trilangular matrix. The rows of the lower trilangular matrix have...

9 years ago

Solved


Check if a matrix is a palindrome in all directions
Check if a matrix is a palindrome both vertically and horizontally. You function will return *true* for |[1,2,1]| or |[2,7,2;...

9 years ago

Solved


time difference
The arrays x and y contain time values in the form of: x = [hours minutes seconds] Create the output z which contains the...

9 years ago

Solved


Project Euler: Problem 18, Maximum path sum I
By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bott...

9 years ago

Solved


Fifteen Parity Check
The Matlab function fifteen initializes the 4x4 array with randperm(16), which produces 50% unsolvable puzzles. A <https://en.wi...

9 years ago

Solved


attenuation
A beam of X-rays propagates a length d(1) through a medium with an attenuation coefficient alpha(1). After that the beam propaga...

9 years ago

Solved


Logarithm with base other than 'e'
Standard log() function returns natural logarithm with base equal to Euler constant. Compute logarithm for a given base.

9 years ago

Solved


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

9 years ago

Solved


Identify the sequence
Given a row vector, x, return 1 if it is an arithmetic series, or 2 if it is a geometric series. If it is neither, return 0. ...

9 years ago

Solved


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

9 years ago

Solved


Logical array indexing - part 1
Given an array |A| of size |p x q| , return an array |Y| of the same size such that the following conditions are satisfied. (...

9 years ago

Solved


How to Concatenate two strings?
How to Concatenate two strings?

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

9 years ago

Solved


Check if a rotated array was originally sorted
Suppose a sorted array is rotated at some pivot unknown to you. For example, |[0 1 2 4 5 6 7]| might become |[5 6 7 0 1 2 4]|. ...

9 years ago

Load more