Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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.

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Mehr laden