A résolu


Function minimization - global minimum
Sequel of problem 45951 <https://www.mathworks.com/matlabcentral/cody/problems/45951> Can you do even better, within the r...

environ un mois il y a

A résolu


Function minimization - beat fminsearch!
Sequel of problem 45948 <https://www.mathworks.com/matlabcentral/cody/problems/45948-function-minimization-beat-fminbnd> M...

environ un mois il y a

A résolu


Function minimization - beat fminbnd!
Matlab's fminbnd function finds a minimizer of a function within an interval. If often gets stuck in local minima. Can you do...

environ un mois il y a

A résolu


Bounding Circle
The Bounding Circle is the smallest enclosing circle to a given set of points on a plane <https://en.wikipedia.org/wiki/Smallest...

environ un mois il y a

A résolu


Least Absolute Deviations (L1-norm) line fit - degree n
This is a generalization of Problem 45851 for degree n <https://www.mathworks.com/matlabcentral/cody/problems/45851-least-abs...

environ un mois il y a

A résolu


Least Absolute Deviations (L1-norm) line fit - degree 1
Matlab's polyfit function is very handy to find least-squares regression. It minimizes the (L2-norm) of the estimation errors, b...

environ un mois il y a

A résolu


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

environ un mois il y a

A résolu


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

environ un mois il y a

A résolu


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

environ un mois il y a

A résolu


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

environ un mois il y a

A résolu


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

environ un mois il y a

A résolu


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.

environ un mois il y a

A résolu


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

environ 2 mois il y a

A résolu


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

environ 2 mois il y a

A résolu


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

environ 2 mois il y a

A résolu


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

environ 2 mois il y a

A résolu


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

environ 2 mois il y a

A résolu


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

environ 2 mois il y a

A résolu


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

environ 2 mois il y a

A résolu


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

environ 2 mois il y a

A résolu


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

environ 2 mois il y a

A résolu


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

environ 2 mois il y a

A résolu


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

environ 2 mois il y a

A résolu


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

environ 2 mois il y a

A résolu


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

environ 2 mois il y a

A résolu


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

environ 2 mois il y a

A résolu


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

environ 2 mois il y a

A résolu


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

environ 2 mois il y a

A résolu


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

environ 2 mois il y a

A résolu


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

environ 2 mois il y a

Charger plus