Solved


Prime Time
All you need to do here is submit your solution a prime number of seconds after the top of the hour. Any hour at all... Easy, ...

9 years ago

Solved


feeling VERY lucky?
Just like Matthew's problem <http://www.mathworks.com/matlabcentral/cody/problems/2793 2793> and Edward's problem <http://www.ma...

9 years ago

Solved


Find difference of two set as per example
Find difference of two set as per example Say x=[1:5] and y=[2:6] then, set_diff(x,y) should give output[1] and set_diff(y...

9 years ago

Solved


Convert number from given base to other base.
Convert number from given base to other base. Example: 400 in base 5 , find equivalent number in base 8, it is 144. *If ...

9 years ago

Solved


JOIN STRINGS
There are two given strings 'STRING1' and 'STR ING2'.|monospaced|The output should be 'STRING1 STR ING2' or STr1='Sum';STr2='EQU...

9 years ago

Solved


hackathon impossible
You might have found a solution to our <http://www.mathworks.com/matlabcentral/cody/problems/205-hackathon-the-beginnings previo...

9 years ago

Solved


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

9 years ago

Solved


capable husband?
* The prospective husband must pass a background check, * and *functions* faithfully, as suggested by <http://www.mathworks.com...

9 years ago

Solved


the fly, the train, the second train, and their Zeno's paradox
*You have heard this one*: A train leaves station _A_ and travels with constant velocity _v1_. A second train leaves station _B_...

9 years ago

Solved


Cumulative product of a vector
Cumulative product of a vector example x=[1 2 5 10], then answer must be [ 1 2 10 100] *If you like this prob...

9 years ago

Solved


Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not coun...

9 years ago

Solved


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

9 years ago

Solved


count to vector
Return a matrix of numbers of dimension K by N, where K = prod(v), and N=length(v). The rows count from a vector of ones up to v...

9 years ago

Solved


Help the Patriots get to the Super Bowl
Given a football by the Patriots, return it to them with 2 psi less air in it. (The original psi is passed as a number to the...

9 years ago

Solved


Feeling lucky?
Guess which number Cody is thinking (1 to 10)? (This is a game of luck more than skill. Good luck!)

9 years ago

Solved


N-th Odious
Given index n return n-th <https://oeis.org/A000069 odious number>.

9 years ago

Solved


Matlab Basics - Rounding III
Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

9 years ago

Solved


Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

9 years ago

Solved


Matlab Basics - Absolute Value
Write a script that returns the absolute value of the elements in x e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]

9 years ago

Solved


Matlab Basics - Set unwated parts of a vector to zero
Consider a vector x, of length >= 7, write a script to set elements 2, 5, and 6 to zero. e.g. x = [1 2 3 4 5 6 7] --> x = [1 ...

9 years ago

Solved


Matlab Basics - Logical Tests I
Write a script to test whether a year number is for a leap year or not. eg. x = 1884 output = 1 eg. x = 3 output = 0

9 years ago

Solved


There are 10 types of people in the world
Those who know binary, and those who don't. The number 2015 is a palindrome in binary (11111011111 to be exact) Given a year...

9 years ago

Solved


Matlab Basics - Pick out parts of a vector
Consider x a vector of length >= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, a...

9 years ago

Solved


Matlab Basics - Create a row vector
Write a Matlab script to create a row vector of 10 consecutive numbers x = [1 2 3 4 5 6 7 8 9 10]

9 years ago

Solved


Matlab Basics - Convert a row vector to a column vector
Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any...

9 years ago

Solved


Matlab Basics - Sum a vector
Write a script to add up all the elements in a vector e.g. x = [1 2 3 4] --> output = 10

9 years ago

Solved


Matlab Basics - Rounding I
Write a script to round x DOWN to the next lowest integer: e.g. x = 2.3 --> x = 2 also: x = 2.7 --> x = 2

9 years ago

Solved


Matlab Basics - y as a function of x
write a script to calculate y as a function of x, such that y = 6x^2 + 5x - 2

9 years ago

Solved


Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...

9 years ago

Solved


Matlab Basics - Assigning Variables
Assign different types of data to variables: integer, double, and strings Example: A is a double, for example 2.34 B is a...

9 years ago

Load more