Community Profile

# Mehmet OZC

1,850 total contributions since 2012

#### Mehmet OZC's Badges

View all

Contributions in
View by

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

15 days ago

Solved

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

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

25 days 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/...

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

1 month ago

Solved

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

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

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

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

1 month 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'

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

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

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

1 month ago

Solved

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

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

1 month 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: ...

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

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

1 month ago

Solved

lb to kilogram
convert lb to kilogram units, easy

1 month ago

Solved

Ounces to Kilograms
convert ounces to kilograms, easy

1 month ago

Solved

remove every row&col for every nan
for a given matrix, remove the row and column of every nan. Example x=[1 2 NaN 4 5 6 7 8 ...

1 month ago

Solved

Good Night :)
Just submit a solution between 20:00:00 and 23:59:59 _Note: Consider Cody Server Time_ *Related Challenges:* # <htt...

1 month ago

Solved

continuous compounding
what's the present value of having 100 dollars after n years given a continuously compounded rate i ? keep only 2 decimals pleas...

1 month ago

Solved

basic finance application
i watch bloomberg everyday and i want to estimate a stock price stability, so i have to calculate the momentum & the rate of cha...

1 month ago

Solved

Writing Error Messages
Well written functions check inputs to make sure the input is valid. The function ErrorCheck takes three arguments: * a - a s...

1 month ago

Solved

find the logic,easy one
find the logic behind, example x=18 y=306 x=53 y=2756

1 month ago

Solved

Matrix to vector transformation
given a matrix, make in the output 1 column vector putting odd numbers in ascending order after that put the even numbers in des...

1 month ago

Solved

Moving Median Absolute Deviation
The median absolute deviation (MAD) is defined as MAD = median(abs(A − median(A))) for a rolling window of length n. For...

1 month ago

Solved

Triangle of numbers
Create a matrix with the integers from 1 to |n| arranged in a triangular shape. Every row |i| of the matrix contains |i| inte...

1 month ago

Solved

Add a vector to a matrix
Given a matrix |mat| of size |mXn| and a row vector |v| of size |1Xs|, return a matrix with |m+1| rows that conatains |mat| over...

1 month ago

Load more