A résolu


Minimize a quadratic function
Write a function to minimize the function . The coefficients a, b, and c will be positive. Give the coefficients in a vector coe...

presque 2 ans il y a

A résolu


Center of Mass(es) in 3D Space
Given a matrix of format [x1,y1,z1,m1; x2,y2,z2,m2 . . .], return the center of mass of all listed points in 3d space [xc,yc,zc]...

presque 2 ans il y a

A résolu


Count of Unique Elements of a Vector
Count the number of times each unique element appears in a vector. Example: Input x = [2 9 1 2 4 9 2] Output y = [1 1; 2 3; 4...

presque 2 ans il y a

A résolu


Approximation of an integral - Riemann sum
Riemann sum is a certain kind of approximation of an integral by a finite sum. In this problem, I want you to use Midpoint Riem...

presque 2 ans il y a

A résolu


Set the Euler-Mascheroni constant with an identity using available MATLAB functions
Cody Problem <https://www.mathworks.com/matlabcentral/cody/problems/42826 42826> asked us to estimate the <https://en.wikipedia....

presque 2 ans il y a

A résolu


Find matching string from a list of strings
Write a function that returns a string that is a unique match (if it exists) of the string inStr from a list of strings strList....

presque 2 ans il y a

Problème


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

presque 2 ans il y a | 1 | 30 solveurs

Problème


Hofstadter Female and Male sequences
The Hofstadter Female (F) and Male (M) sequences are defined as follows Write a function to compute for a given n. See http...

presque 2 ans il y a | 0 | 8 solveurs

Problème


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

presque 2 ans il y a | 0 | 11 solveurs

Problème


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

presque 2 ans il y a | 0 | 12 solveurs

A résolu


Generate the Figure-Figure sequence
After discussing Scott Kim’s FIGURE-FIGURE Figure (below) in Gödel, Escher, Bach, Douglas Hofstadter introduced an integer seque...

presque 2 ans il y a

Problème


Stern-Brocot Sequence
The Stern-Brocot diatomic sequence is defined as follows: The first elements of the sequence are 0, 1, 1, 2, 1, 3, 2, 3, 1, 4...

presque 2 ans il y a | 0 | 9 solveurs

Problème


Interval Compression
Given a set of integers, the task is to create a list of closed intervals where each interval includes its endpoints. For exampl...

presque 2 ans il y a | 0 | 10 solveurs

Problème


Final Stone Weight
You are given an array with weights of stones. The objective is to determine the weight of the final stone remaining after all c...

presque 2 ans il y a | 1 | 14 solveurs

A résolu


Circular Primes (based on Project Euler, problem 35)
The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime. The...

presque 2 ans il y a

A résolu


Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

presque 2 ans il y a

A résolu


Finger Counting
Just counting numbers using fingers. First all my ten fingers are closed. I will say 1 and open my one finger. Likewise for 6...

presque 2 ans il y a

A résolu


Remove DC
Input x is the sampled signal vector, may have both AC and DC components. Output y should not contain any DC component. Examp...

presque 2 ans il y a

A résolu


2 b | ~ 2 b
Given a string input, output true if there are 2 b's in it, false if otherwise Examples: 'Macbeth' -> false 'Publius Cornelius...

presque 2 ans il y a

A résolu


Cumulative difference
Given an array, return the cumulative difference. Example a = [ 1 3 5 7 ] cumdiff = [ 1 2 1 -2 ]

presque 2 ans il y a

A résolu


Space Saver
Remove all characters that are below a space in ASCII value.

presque 2 ans il y a

A résolu


All your base are belong to us
Find the base _b_ logarithm of the input decimal number _x_. Express the output as a decimal number. The first argument is the n...

presque 2 ans il y a

A résolu


Who is the baby and who is the daddy in this family?
Given an array of numbers that shows the characteristcs of all family members, find who is the baby and who is daddy in this fam...

presque 2 ans il y a

A résolu


interesting center of magic matrix
output the centre of magic matrix of n input=7; output=25

presque 2 ans il y a

A résolu


give-nth-decimal-place-of-pi up to 100 digits
max 100th place after the decimal point this is upgrade problem of 142

presque 2 ans il y a

A résolu


most frequent character
Obtain the most frequent character. For example, s='balaram'; output='a'; If there is a tie between letters, return t...

presque 2 ans il y a

A résolu


Create different color vectors.
When producing figures with multiple lines on, you often want the lines to all be visible and different colors. Given the need f...

presque 2 ans il y a

A résolu


Make a list string
Given a cell string, produce a string separating the items with spaces and commas and with an 'and' preceding the final item, an...

presque 2 ans il y a

A résolu


How many points lie within the rectangle and how many aren't?
Suppose, you are given the coordinates of bottom-left and top-right corners of a rectangle as *input-1, R* i.e *R=[Bottom-left c...

presque 2 ans il y a

A résolu


Convert to Binary Coded Decimal
Convert from decimal representation to <http://en.wikipedia.org/wiki/Binary-coded_decimal Binary Code Decimal> (or BCD) represen...

presque 2 ans il y a

Charger plus