Solved


What is the current time in Darwin, Australia?
Traders need to track exchange calendars and trading hours in detail, and account for time zone differences and daylight savings...

25 days ago

Solved


Convert vector datasets to plot with imagesc instead of scatter
For large datasets this allows much faster plotting. An irregular 2D spatial sampling is provided in x and y vectors with a d...

25 days ago

Solved


Magic Concentric Circles
Consider 4 magic circle circles around a single number in the sequence 1:n where the sum along the diameters is always equal, an...

25 days ago

Solved


Key Generation for Solitaire Cipher
The Solitaire Cipher by Bruce Schneier was introduced to Cody in two problems by Doug Hull: http://www.mathworks.com/matlabcent...

25 days ago

Solved


Borderline Connectivity
Compute the connected components of pixel borders. Suppose that h and v together describe a logical labeling of the borders b...

25 days ago

Solved


Approximate the inverse tangent by power series
Given values b (where abs(b)<=1) and n (polynomial order), write a function that calculates atan(b) by using power series.

25 days ago

Solved


"Bubblegum, Bubblegum, in a dish; How many pieces do you wish?"
The child's game "bubblegum, bubblegum, in a dish; how many pieces do you wish?" is a way of eliminating players until a single ...

26 days ago

Solved


Complete a 2nd order difference sequence
In Cody Problem 59791 ChrisR asks us to find the integer that completes a randomly sorted geometric sequence with one missing el...

26 days ago

Solved


increasing sequences
Given a string of digits, insert commas to create a sequence of strictly increasing numbers so as to minimize the magnitude of t...

26 days ago

Solved


Find the particular dividend
It is known that once you write the sequence 10101...101 long enough, the number will be finally divisible by any odd number if ...

26 days ago

Solved


factorial
There are really some cody problems related to factorial of n, e.g., 42667, 45184, 46054, and etc. It is interesting to ask why ...

26 days ago

Solved


three digits
Input three digits no larger than 4,say 1,2 and 3, write the possible largest number composed(concatenation and power) only by t...

26 days ago

Solved


prime consecutive sums
Create a number sequence of 1 to n, such that the sums of every two consecutive numbers are all primes. E.g. if n = 5, you may ...

26 days ago

Solved


how to concatenate matrices
What is the name of the function used to create a matrix C form two matrices A and B, using the syntax: C = [A B]; Outpu...

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

26 days ago

Solved


Hilbert Scan Algorithm
As Zig-Zag and Horizontal ... we have also a < <Hilbert> <Scan> > as shown in this article <http://link.springer.com/chapter/10....

26 days ago

Solved


Stop a ZigZag scanning N*N Matrix at any diag you want
Suppose that we have a 2-D matrix and we try to obtain a 1-D array in zig-zag order, but not all values of our 2-D matrix e...

26 days ago

Solved


Adaptive ZigZag
Unfold a 2-D matrix to a 1-D array in Adaptive zig-zag order, e.g., for matrix [ 1 2 5 6; 3 4 7 8; 9 10 13 14; ...

26 days ago

Solved


Create a 3D rotation matrix from roll-pitch-yaw angles
Consider a robotics application where the world reference coordinate frame {W} and a robot manipulator arm with an attached tool...

26 days ago

Solved


Orientation of a 3D coordinate frame
The orientation of a body-fixed frame {B} with respect to the world frame {W} is described by an SO(3) rotation matrix. Compute...

26 days ago

Solved


Determine roll pitch yaw angles from a 3D rotation matrix
Consider an aerospace application where the world reference coordinate frame {W} and a body-fixed coordinate frame {B}. The ori...

26 days ago

Solved


Homogeneous lines and points in 2D: problem 1
In high school we learn the line equation y = mx + c where m is the gradient and c is the intercept. However this form is proble...

26 days ago

Solved


Upstairs!
The stair has n steps. Every times you can up one or two steps. Give all the different solutions to upstairs. For example n ...

27 days ago

Solved


Successive zeros (harder)
The problem is from Problem 45436, <https://www.mathworks.com/matlabcentral/cody/problems/45436-successive-zeros> Suppose n i...

27 days ago

Solved


Solve Sudoku puzzle step by
Sudoku is a famous puzzle. <https://en.wikipedia.org/wiki/Sudoku> Give a standard sudoku by a matrix (9*9), You need give a ...

27 days ago

Solved


Big Integer Sqrt
You will be given a big integer, you should return the square root of it. input: '16' output: '4' have fun!

27 days ago

Solved


Project Euler: Problem 14 Longest Collatz sequence(harder version)
This problem is a harder version of "Problem 44448. Project Euler: Problem 14 Longest Collatz sequence", because of time limits....

27 days ago

Solved


Compute the intersect point of line and plan
Compute the intersect point of line and plan. eg. line AB, the coordinate of A is (1,2,3) the coordinate of B is (-4,-5,-6...

27 days ago

Solved


Return fibonacci sequence do not use loop and condition version 3
Calculate the nth Fibonacci number,return sequence Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... ...

27 days ago

Solved


Backgammon #5 - Valid Move?
A previous problem in this occasional series (Problem 45967) set up a possible representation of a backgammon board: White ston...

27 days ago

Load more