Solved


Top of the Hour : Return from your routine within 1 second of the hour
*Top of the Hour* Submit your routine such that it returns to Cody after the hour and within 1 second of the hour. The tes...

23 days ago

Solved


Find the first N zeros of the 666 function
Using the following definition of the 666 function for this problem: _f(n)=sin('nnn')-cos(n*n*n)_, write a function that returns...

23 days ago

Solved


Sum of Dividend Digits
Find the smallest number that consist of only number 1's (e.g. 11111111111) which satisfy a given divisor and remainder. Then re...

23 days ago

Solved


False position (linear interpolation) method of finding a root.
Test the false position algorithm described in Chapter 5 of Steven C. Chapra's textbook, Applied Numerical Methods with MATLAB f...

23 days ago

Solved


Find all the zeros of sinus , cosinus and tangent in a given interval
The aim is to find all the zeros of a function within an interval. *Input* : * fcn : an anonymous function (@sin, @cos......

23 days ago

Solved


Generalized sorting
Write generalized sort function |sortg()| that sorts array elements in “ascending” order with given comparison funct...

23 days ago

Solved


Subtraction
Subtract a from b.

23 days ago

Solved


Squares
Find the square of x.

23 days ago

Solved


Compute Airspeed from Mach Number
Write a MATLAB function that converts a Mach number to airspeed given the speed of sound aa in m/s: V=M⋅a V = airspeed (m/s) M...

23 days ago

Solved


Zero
given an integer a, find the smallest possible integer b(b>0) such that their bitwise logical AND is zero. * if a=11(1011) t...

23 days ago

Solved


Find my secret function IV
We use the same secret function used on the past "Find my secret function ..." x=23 -------->> y=3 X=1000 ------->> 163

23 days ago

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

23 days ago

Solved


Find prime number couples
Given a vector a, which will always contain at least one pair of prime numbers couple, return a matrix called 'couple' in which ...

23 days ago

Solved


Normie Function (2)
Another _Normie Function_ defined as _f(n)= f(n-1)+f(n-2)+f(n-3)_ , *when n>3* and _1_ , *when n<=3*. *Find the nth term of this...

23 days ago

Solved


Probabilities - Balls and urns - 01
The urn contains B blue balls and R red balls. Each trial consists of drawing one random ball from the urn and observing its col...

24 days ago

Solved


GJam 2017 Kickstart: Parentheses (Small)
This Challenge is derived from <http://code.google.com/codejam/contest/6304486/dashboard#s=p2 GJam 2017 Kickstart Parentheses>. ...

24 days ago

Solved


Put all numbers in a string inside square brackets
Examples: 'left3down2' -> 'left[3]down[2]' 'fiat500' -> 'fiat[500]'

24 days ago

Solved


Laguerre Polynomials
Create a square lower diagonal matrix containing the first n Laguerre Polynomial coefficients. For n=6, the Laguerre Matrix is: ...

24 days ago

Solved


Area-06
The length of the side of a square is given. Draw 4 quarter-circles inside the square from 4 corners with a radius equal to the...

24 days ago

Solved


Method of Common Differences part-2
This is the inverse problem to <http://www.mathworks.com/matlabcentral/cody/problems/1485 Problem 1485>. Problem 1485 illustra...

24 days ago

Solved


Create numeric palindromes and their square roots
Given a number n (1<=n<=9), return a left justified numeric matrix p with all the palindromes of the form 1 to n and back to 1. ...

24 days ago

Solved


String Logic 17
Examples: 'DIG' --> 'GDI' 'IMPORTANT' --> 'TANTIMPOR' 'DEAL' --> 'EALD' 'LIMB' --> 'IMBL' 'MOSTLY' --> 'YMOSTL'

24 days ago

Solved


Eliminate unnecessary polygon vertices
Suppose you have an n-point polygon represented as an n-by-2 matrix of polygon vertices, P. Assume that the polygon is closed; t...

24 days ago

Solved


Script file size
Determine the file size of a script, "function.m". This is the base scoring method for Cody and the Matlab Contests. A method ...

24 days ago

Solved


Determine if a number (x) is a power of another (n)
If the number x is indeed a power of n, then return true. Otherwise, return false. For example, if x = 9 and n =3, then pow = t...

24 days ago

Solved


Division
Divide a by b.

24 days ago

Solved


Aufbau principle
Given the order e=[1s, 2s, 2p, 3s, 3p, 4s, 3d, 4p, 5s, 4d, 5p, 6s, 4f, 5d, 6p, 7s, 5f, 6d, 7p], find a vector x with these condi...

24 days ago

Solved


Red Cross ❌

24 days ago

Solved


Float like a cannonball
Given gravity on earth (g=9.81 [m/s/s]) find the distance s [m] by a cannonball propelled at a speed of u [m/s] from the origin ...

24 days ago

Solved


Get the value 100
Knowing that 123-45-67+89=100, write a function that gives this result for any order of the digits in the input. Otherwise, the ...

24 days ago

Load more