Solved


Find my secret function II
If give my function a x value it will give me a y value, so find the secret of it: Examples: input x=23 ---- >>> output y=1...

2 years ago

Solved


Ackerman Function

2 years ago

Solved


Error handling
If the input is a negative number, generate an error. Otherwise, return the number.

2 years ago

Solved


Is this function available?
Sometimes it is difficult to remember which functions are not allowed on the Cody platform. Given a function as a string, return...

2 years ago

Solved


Get factory-defined property values
Given a property name (e.g. 'AxesUnits', 'LineMarkerSize', 'UicontrolBackgroundColor'), return the factory-defined value for tha...

2 years ago

Solved


yet another flying fly (YAFF)
Same as the previous problem <http://www.mathworks.com/matlabcentral/cody/problems/203-fly-fly-away fly fly away> but now with *...

2 years ago

Solved


Determine whether the given number is palindrome or not.
A palindromic number (also known as a numeral palindrome or a numeric palindrome) is a number (such as 16461) that remains the s...

2 years ago

Solved


Compute the nth Pythagorean prime
Pythagorean primes have the form p = 4n+1, where n is an integer, and they can be written as the sum of squares of two integers....

2 years ago

Solved


Bullseye Matrix with Zeros
Inspired by Problem 18, create a bullseye matrix with the addition of padding equal to 0 between concentric rings. Matrices are ...

2 years ago

Solved


Sky full of stars - 02
draw an isosceles triangle with asterisks of size n. For example, for n=6 ' * ' ' *** ' ' **...

2 years ago

Solved


Sky full of stars - 01
Draw a right triangle with asterisks of size n. For example, for n=5 '* ' '** ' '*** ' '**** ' ...

2 years ago

Solved


The Tortoise and the Hare - 01
Suppose in an infinitely long line, the hare is standing in position 0. From that place, it can jump either in the +ve direct...

2 years ago

Solved


Identify the sequence
Given a row vector, x, return 1 if it is an arithmetic series, or 2 if it is a geometric series. If it is neither, return 0. ...

2 years ago

Solved


Increasing sub-sequence (Level 1)
Given a vector, v, of real numbers, return a positive integer, n, representing the longest contiguous increasing sub-sequence co...

2 years ago

Solved


Modulo with 5

2 years ago

Solved


Sky full of stars - 03
draw the following pattern with asterisks. For example, for n=6 '************' '***** *****' '**** ****' ...

2 years ago

Solved


nxn matrix with elements from 1:n^2
really simple once you see what the matrix is supposed to look like. i appreciate what seems to be a clever approach to solving ...

2 years ago

Solved


Basic Matlab Operation Bonanza
Given a horizontal array of numbers, perform the following operations, in order: transpose, flip matrix horizontally, flip matri...

2 years ago

Solved


Find the gcm of n given values
Create a function that given n integer values greater than zero, finds the two numbers with the greatest common divisor and retu...

2 years ago

Solved


Sort vector by number of prime factors of each element
Sort a given array based on how many prime factors each term has. Sort from least to greatest and output original values. Ex: ...

2 years ago

Solved


Memory Map File: Access and Update
Challenge is to read data from a memory map file and also update the file. Memory Mapping allows placing large static arrays ...

2 years ago

Solved


Get the variable value from a string and generate sum
Get the variable value from a string. Example. x = 'A=10' y = 'B=20' Result = (x+y) Result = 30

2 years ago

Solved


Remove Duplicates
Remove duplicates from the vector of integers and display in sorted order

2 years ago

Solved


Leonardo primes
Leonardo numbers are defined by following recurrence relation: Leonard prime is Leonardo number which is also prime (see ...

2 years ago

Solved


Draw a triangle of ones
For any given n, return a matrix that includes a triangle of ones of height n: Example n = 3 output = [0,0,1,0,0 ...

2 years ago

Solved


Return longest string in 1-D array of strings
Find the longest string in an array of strings. Return an empty string if the initial array is empty. If there are multiple stri...

2 years ago

Solved


Create a column vector of n elements between a and b (both included)
Given lower limit a and an upper limit b, create a column vector of n elements inclusive of a and b. For example: a = 1, b = 4,...

2 years ago

Solved


Is the number of 1s in a binary integer odd or even?
Your function should turn the input integers into binary form and count the number of 1s in the binary. If the number is odd, re...

2 years ago

Solved


Find the moving-average of the elements of a vector
Example Input vector: [1 2 3 4] output vector: 1st element=1/1, 2nd element=(1+2)/2, 3rd element=(1+2+3)/3, 4th element=(1+2...

2 years ago

Load more