Solved


Find the missing numbers.
Total *N* numbers are in the series of natural numbers ( *1,2,3,...,N* ). The input is an array (unsorted) of those natural num...

8 years ago

Solved


Sum of diagonals
Compute the sum of diagonal elements of a square matrix and store the larger sum to s. Eg : a = [1 2 3; 2 3 4; 4 5 10] ...

8 years ago

Solved


Basic matlab numeric and string manipulations
If entered input (n) is _numeric_ , compute its *log to the base (n+2)* , if it is a _lower case_ alphabet, *convert it to i...

8 years ago

Solved


surface areas of a cylinder
There are 3 inputs: option, radius and height. If option= '1', compute the lateral surface area of the cylinder, for option 2 ca...

8 years ago

Solved


Product of all elements in an array
Compute the product of all elements in an array.

8 years ago

Solved


Capitalized string operations
Convert the input sentence to upper case and replace all vowels with an underscore ('_')

8 years ago

Solved


Return median of a matrix
Compute median of a matrix of any dimension. Exclude the NaNs if any.

8 years ago

Solved


The answer to life the universe and everything
Write a function that gives the answer to life the universe and everything to every input except the input is 42. In this case t...

8 years ago

Solved


Find parts of a circle.
Given radius (r) of a circle find the diameter (d), circumference (c), an area (a).

8 years ago

Solved


Determine the number of correct and incorrect answers
In a Multiple Choice Question Test, you are to sort out answer from 4 samples, one of them is correct answer. There are 50 quest...

8 years ago

Solved


Calculating the total earnings of a factory
The row vector, prods contains the number of various products manufactured per hour. The second row vector, prices holds values ...

8 years ago

Solved


Funny problems
Generate the following vector: if n=1 then q=1; elseif n=2 then q=[2 2 1]; elseif n=3 then q=[3 3 3 2 2 1]; ... end

8 years ago

Solved


Happy Free March!
Just submit your solution in any March. *Related Challenges:* # <https://www.mathworks.com/matlabcentral/cody/problems/445...

8 years ago

Solved


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

8 years ago

Solved


Happy Free 15th Day of a Month!
Just submit your solution on 15th day of any month. *Related Challenges:* # <https://www.mathworks.com/matlabcentral/cody/...

8 years ago

Solved


Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
If _p_ is the perimeter of a right angle triangle with integral length sides, { _a_, _b_, _c_ }, there are exactly three solutio...

8 years ago

Solved


Happy Free Wednesday!
Just submit your solution on any Wednesday. *Related Challenges:* # Happy Free Wednesday! # <https://www.mathworks.com/m...

8 years ago

Solved


what can you get for exactly amount of money
You go to store, where each product has price. Prices are in vector s = [ 195 125 260 440 395 290] and you have amount ...

8 years ago

Solved


Determine whether the input is odd, even, or neither.
Make a function that returns ‘odd’ if the input is odd, ‘even’ if the input if even or ‘error’ if the input is neither odd nor ...

8 years ago

Solved


Find the last digit
FInd the last digit of a given number. Given number is the input and output should be the last digit of that number.

8 years ago

Solved


Determine whether the input is divisible by 3 as well as 5
If the input is divisible by 3 as well as 5 then the output should be 'true' otherwise 'false'

8 years ago

Solved


Vertical matrix sort
Given a matrix x with n rows and m columns, return a matrix y with 2n rows and m columns, such that every column in x is sorted ...

8 years ago

Solved


Horizontal matrix sort
Given a matrix x with n rows and m columns, return a matrix y with n rows and 2m columns, such that every row in x is sorted fro...

8 years ago

Solved


Goldbach's marginal conjecture - Write integer as sum of three primes
Goldbach's strong conjecture states that every even integer greater than 2 can be expressed as the sum of two primes. For exampl...

8 years ago

Solved


determine amount cookies left
started with 3 cookies and you never ate any how many are left

8 years ago

Solved


Sum of adjacent elements in a vector
Given a vector v, return a vector s containting the sum of every two adjacent elements in the vector. Every element s(i) cont...

8 years ago

Solved


Portfolio diversification: choose your stocks !
we have the returns of 3 stocks for the last 4 years and we have to combine only 2 stocks that are less correlated. Example: ...

8 years ago

Solved


short or buy ? take the opportunity
you had already calculated a theoretical stock value, now you checked in bloomberg the quoted price of that stock and you have t...

8 years ago

Solved


what's my tax amount this year ?
given an annual salary x and a tax rate i calculate the amount that you have to pay.Example x = 70000; i=.10 y_correc...

8 years ago

Solved


lb to kilogram
convert lb to kilogram units, easy

8 years ago

Load more