A résolu


Create a Cell array of month-end date strings within a date range
This is a variation of <http://www.mathworks.com/matlabcentral/cody/problems/1039-get-an-array-of-month-ends-in-a-date-range Get...

environ 13 ans il y a

A résolu


Monty Hall
The classic Monty Hall "Let's Make a Deal" final showcase puzzle pits the contestant against three Doors. Behind one Door are dr...

environ 13 ans il y a

A résolu


Moving average (variable kernel length)
Find the moving average in a vector. The kernel length is a variable. For example x = 1:10 kernel_length = 2 would r...

environ 13 ans il y a

A résolu


Geometry: Find Circle given 3 Non-Colinear Points
*This Challenge is to determine the center and radius of a circle given three non-colinear points.* *Input:* Points *Outpu...

environ 13 ans il y a

A résolu


Binary Coder
Take an input number and print the binary value of this number.

environ 13 ans il y a

A résolu


MATCH THE STRINGS (2 CHAR) very easy
Match the given string based on first two characters on each string. For example A='harsa'; b='harish'; result '1' ...

environ 13 ans il y a

A résolu


Coin Tossing: Probability of Same Heads for N tosses
A pair of physicists toss a coin n times each. What is the probability that they tossed the same number of heads? *Input:*...

environ 13 ans il y a

A résolu


Convert a structure into a string
Convert the contents of each fields into a string. Example with an input structure s with 2 fields : s.age = '33' s....

environ 13 ans il y a

A résolu


dir with recursive subdirectory search
Write a function that performs a recursive file search. The input and output format can be identical to the dir function. The ...

environ 13 ans il y a

A résolu


Find files with extension ext in the current directory
List all files with extension 'ext' in the current directory. Return a char matrix with the name of files in rows. Return 0 if...

environ 13 ans il y a

A résolu


James Bond film count
Twenty-three James Bond films have been produced, in the years 1962, 1963, 1964, 1965, 1967, 1969, 1971, 1973, ... 197...

environ 13 ans il y a

A résolu


Gauss Eliminate 2-by-2 example
Use forward elimination to make the coefficient matrix, A, an upper triangular matrix, and then solve using back substitution, f...

environ 13 ans il y a

A résolu


Map all the indices of an Array Indices into a Vector giving Index vs Row and Column
Create an array of the row and column values for the indices of an array. This is typically performed using [r c]=ind2sub(siz...

environ 13 ans il y a

A résolu


Get an array of month-ends in a date range
Create a function that would return a list of month-ends falling in a given date range. If a start date or end date falls on a...

environ 13 ans il y a

A résolu


Read a Soroban Abacus
*Description* The Soroban is the name of the modern Japanese abacus. Information on reading a Soroban can be found <http://we...

environ 13 ans il y a

A résolu


How to add?
* Imagine you are in 2222 Anno Domini, when everyone must learn how to add, * and competing for the highly prestigious post of,...

environ 13 ans il y a

A résolu


Split a string into chunks of specified length
Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...

environ 13 ans il y a

A résolu


Find the elements of a matrix according to a defined property.
From A = [5,2,3] and B = [1,2,3,4,5,6,7,8,9,10] produce a vector C where : C(1) is the sum of the first A(1) elements of B, ...

environ 13 ans il y a

A résolu


Special matrix
Make a square matrix with this shape. For n=4 M = 1 1 0 0 1 0 1 0 0 1 0 ...

environ 13 ans il y a

A résolu


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

environ 13 ans il y a

A résolu


Using ISOSURFACE to graph (half of) an ellipsoid
Hello, I've been trying to use isosurface and triscatteredintp (and meshgrid and reshape at times) to generate an 3D ellipsoi...

environ 13 ans il y a

A résolu


Given a 4x4 matrix, swap the two middle columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

environ 13 ans il y a

A résolu


find a specific value in a matrix
Hi, I am using matlab for a thesis I have to write. the matrix consists of several option characteristicas such as closing pric...

environ 13 ans il y a

A résolu


Volume of a sphere given its surface area
You just measured its surface area, that is the input.

environ 13 ans il y a

A résolu


Given two strings, find the maximum overlap
Given two strings s1 and s2, create a new string s3 which is as short as possible and contains both strings. If s1 = [1 2...

environ 13 ans il y a

A résolu


Rescaling vector
Rescale the entries of a vector x so that it spams [a,b]. The new values should be linearly stretched into the new range. _Ex...

environ 13 ans il y a

A résolu


What is Title of Cody Challenge 42?
Given a Cody Challenge number return its Title. *Input:* Cody Challenge Number *Output:* Title of the Cody Challenge ...

environ 13 ans il y a

A résolu


Wheat on a chessboard pt 2
If a chessboard were to have wheat placed upon each square such that x grains were placed on the first square and each successiv...

environ 13 ans il y a

A résolu


Join Strings with Multiple Different Delimiters
The idea is to form the string S by interleaving the elements of a cell array of strings DELIMITER and another cell array of st...

environ 13 ans il y a

A résolu


Give me Hamming on five, hold the mayo
A Hamming Number is a positive number that has no prime factor greater than 5. Given a number X, determine how many Hamming num...

environ 13 ans il y a

Charger plus