Gelöst


Enlarge array
Given an m-by-n numeric array (A) and a 1-by-2 vector (sz) indicating the dimensions [p q] to enlarge each element, return an (m...

etwa ein Jahr vor

Gelöst


MatCAT - Reconstruct X from Its X-rays
Consider a matrix x x = [ 1 2 0 0 5 0 3 0 8 ] If we sum x along the rows we get row_sums = [3 5 11] ...

etwa ein Jahr vor

Gelöst


Matrix of Multiplication Facts
This is James's daughter again, sneaking into his Cody account. Thanks to your help in my math class last year, I did great! But...

etwa ein Jahr vor

Gelöst


matrix zigzag
Unfold a 2-D matrix to a 1-D array in zig-zag order, e.g., for matrix [ 1 2 3 ; 4 5 6 ; 7 8 9 ] the resulting 1-...

etwa ein Jahr vor

Gelöst


Great Circle Distance
Find shortest between two points on a ball given their azimuthal and polar angles (in degrees) as well as the radius of the sphe...

etwa ein Jahr vor

Gelöst


Smallest distance between a point and a rectangle
Given two points *x* and *y* placed at opposite corners of a rectangle, find the minimal euclidean distance between another poin...

etwa ein Jahr vor

Gelöst


Clockwise or Counterclockwise
Given a list of 2-d points defining the vertices of a polygon, determine whether these points are sorted clockwise. The input...

etwa ein Jahr vor

Gelöst


Circumscribed circles
Given the lengths of the 3 sides of a triangle, output the radius of the circumscribed circle. Example: [3 4 5] -> 2.5

etwa ein Jahr vor

Gelöst


Clock Hand Angle 1
Given a time in HH:MM:SS, find the smallest angle (in degrees) between the hour and minute hand

etwa ein Jahr vor

Gelöst


Covering area
As an extension of the problem <http://www.mathworks.com/matlabcentral/cody/problems/416-polygon-area>, find the area, bounded b...

etwa ein Jahr vor

Gelöst


Spherical radius given four points
Determine the radius of a sphere provided four non-coplanar points on the surface of the sphere. pts = [x1 y1 z1; x...

etwa ein Jahr vor

Gelöst


Volume of a Parallelepiped
Calculate the volume of a Parallelepiped given the vectors for three edges that meet at one vertex. A cube is a special case ...

etwa ein Jahr vor

Gelöst


Find third Side of a right triangle given hypotenuse and a side. No * - or other functions allowed
Find the remaining side of a triangle given the hypotenuse and a side. However, the normal functions and symbols are not allowe...

etwa ein Jahr vor

Gelöst


Television Screen Dimensions
Given a width to height ratio of a TV screen given as _w_ and _h_ as well as the diagonal length of the television _l_, return t...

etwa ein Jahr vor

Gelöst


Decimation - Optimized for speed
This problem is similar to http://www.mathworks.com/matlabcentral/cody/problems/1092-decimation, only this time the score will b...

etwa ein Jahr vor

Gelöst


Implement a bubble sort technique and output the number of swaps required
A bubble sort technique compares adjacent items and swaps them if they are in the wrong order. This is done recursively until al...

etwa ein Jahr vor

Gelöst


Set a diagonal
Given a matrix M, row vector v of appropriate length, and diagonal index d (where 0 indicates the main diagonal and off-diagonal...

etwa ein Jahr vor

Gelöst


Decimation
When dealing to the Roman Army, the term decimate meant that the entire unit would be broken up into groups of ten soldiers, and...

etwa ein Jahr vor

Gelöst


Finding peaks
Find the peak values in the signal. The peak value is defined as the local maxima. For example, x= [1 12 3 2 7 0 3 1 19 7]; ...

etwa ein Jahr vor

Gelöst


Hofstadter Q sequence
The Hofstadter Q sequence is defined as follows: The first elements of the sequence are 1, 1, 2, 3, 3, 4, 5, 5, 6, 6. Write ...

etwa ein Jahr vor

Gelöst


Maximizing Stock Profit
As a stock exchange broker focusing on a single transaction, your goal is to maximize profit by buying a stock at a low price an...

etwa ein Jahr vor

Gelöst


Secret Message and Acrostic
One of the simplest ways to hide a message involves utilizing uppercase letters. Given a text, collect all uppercase letters in...

etwa ein Jahr vor

Gelöst


ICFP 2024 Programming Contest June 28 thru July 1
This is to announce the annual ICFP programming contest for 2024. The ICFP 2024 homepage link is ICFP 2024 . Registration will...

etwa ein Jahr vor

Gelöst


Sum along each diagonal of a matrix
Write a routine that returns the sums along the diagonals of a given matrix, A, where the first diagonal is the bottom left corn...

etwa ein Jahr vor

Gelöst


Complete hydraulic geometry relations
Hydraulic geometry relations express the velocity , width , and depth of a river as a function of the discharge (or flow) , whi...

etwa ein Jahr vor

Gelöst


Play Hocus Focus
The card game Hocus Focus starts by placing twelve cards with wizards face up on a table. The characteristics of the wizards tha...

etwa ein Jahr vor

Gelöst


Convert integers from primary notation to base 10
The primary system of expressing numbers has three digits: m, x, and p, which correspond to -1, 0, and 1. The places in a primar...

etwa ein Jahr vor

Gelöst


CamelCase to snake_case convention
The CamelCase naming convention capitalizes the first letter of each word. In snake_case convention, words are written in lowerc...

etwa ein Jahr vor

Gelöst


snake_case to CamelCase convention
The snake_case naming convention writes words in lowercase and separates them with underscores. In CamelCase convention, the fir...

etwa ein Jahr vor

Gelöst


Add non-triangular numbers
The nth triangular number is the sum of the first n positive integers. The sequence of triangular numbers starts 1, 3, 6, 10, 15...

etwa ein Jahr vor

Mehr laden