A résolu


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

environ 11 ans il y a

A résolu


Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

environ 11 ans il y a

A résolu


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

environ 11 ans il y a

A résolu


inner product of two vectors
inner product of two vectors

environ 11 ans il y a

A résolu


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

environ 11 ans il y a

A résolu


Is my wife right? Now with even more wrong husband
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

environ 11 ans il y a

A résolu


Sums with Excluded Digits
Add all the integers from 1 to n in which the digit m does not appear. m will always be a single digit integer from 0 to 9. no...

environ 11 ans il y a

A résolu


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

environ 11 ans il y a

A résolu


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

environ 11 ans il y a

A résolu


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

environ 11 ans il y a

A résolu


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

environ 11 ans il y a

A résolu


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

environ 11 ans il y a

A résolu


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

environ 11 ans il y a

A résolu


Making change
Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = ...

environ 11 ans il y a

A résolu


Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

environ 11 ans il y a

A résolu


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

environ 11 ans il y a

A résolu


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

environ 11 ans il y a

A résolu


Find perfect placement of non-rotating dominoes (easier)
Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

environ 11 ans il y a

A résolu


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

environ 11 ans il y a

A résolu


Scoring for oriented dominoes
Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

environ 11 ans il y a

A résolu


It's race time! Write a faster function than the test suite call of unique().
Write a function to get unique elements of a vector faster than unique()! Input will be a vector (of integers or floating point ...

environ 11 ans il y a

Problème


It's race time! Write a faster function than the test suite call of unique().
Write a function to get unique elements of a vector faster than unique()! Input will be a vector (of integers or floating point ...

environ 11 ans il y a | 0 | 31 solveurs

A résolu


Output any real number that is neither positive nor negative
Output any real number that is neither positive nor negative

environ 11 ans il y a

A résolu


Who is the smartest MATLAB programmer?
Who is the smartest MATLAB programmer? Examples: Input x = 'Is it Obama?' Output = 'Me!' Input x = 'Who ?' Ou...

environ 11 ans il y a

Problème


Who is the smartest MATLAB programmer?
Who is the smartest MATLAB programmer? Examples: Input x = 'Is it Obama?' Output = 'Me!' Input x = 'Who ?' Ou...

environ 11 ans il y a | 6 | 735 solveurs

Problème


Determine the number of odd integers in a vector
Determine the number of unique odd integers in a vector. Examples: Input x = [2 5 8 3 7 1]; Output y = 4; Inp...

environ 11 ans il y a | 5 | 668 solveurs

A résolu


Determine the number of odd integers in a vector
Determine the number of unique odd integers in a vector. Examples: Input x = [2 5 8 3 7 1]; Output y = 4; Inp...

environ 11 ans il y a

A résolu


Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

environ 11 ans il y a

A résolu


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

environ 11 ans il y a

A résolu


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

environ 11 ans il y a

Charger plus