A résolu


Compound Interest: Interest Rate
Theorem : Compound Interest where, F : Future value at the end of n periods P : Present value r : Annual nominal rate n :...

28 jours il y a

A résolu


Test Driven Solution - Probability Problem 1
*Problem:* Without any Cody cheats, write code that passes the test suite. *Hint:* The test suite gets samples from the proba...

29 jours il y a

A résolu


Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

environ un mois il y a

A résolu


matrix of natural number
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 resides seially as shown in the examples below. ...

environ un mois il y a

A résolu


Distance walked 2D
Suppose you go from x-y coordinates [3,4] to [0,0] to [0,1] to [1,1], then you walked 7 units of distance.

environ un mois il y a

A résolu


Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

environ un mois il y a

A résolu


Moving average (variable kernel length)
Find the moving average in a vector. The kernel length is a variable. For example x = 1:10 kernel_length = 2 would r...

environ un mois il y a

A résolu


Cody Computer Part 2 - Get the license number of Cody Computer
In the Cody computer investigation party, you may have already solved : <http://www.mathworks.com/matlabcentral/cody/problems...

environ un mois il y a

A résolu


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

environ un mois il y a

A résolu


Multiply 2 numbers
Very easy, you just have to multiply 2 numbers but you cannot use the following signs (*, /, - ,^) ,mtimes , times, cross, pro...

environ un mois il y a

A résolu


Perl 1: push
_This is part of a series of perl function which were very helpful for many perl programmers. Could you implement it in Matlab?_...

environ un mois il y a

A résolu


Church Encoding
Church encoded numeral is a function which takes two arguments _f_ and _x_ and applies _f_ to _x_ several times. For example,...

environ un mois il y a

A résolu


Calculate cosine without cos(x)
Solve cos(x). The use of the function cos() and sin() is not allowed.

environ un mois il y a

A résolu


Negative without '-'
Simple: return a negative number without using the '-' sign. Thanks to Problem <https://www.mathworks.com/matlabcentral/cody/...

environ un mois il y a

A résolu


Calculate the hypotenuse of a right triangle without using ^ and sqrt ()
Find out the hypotenuse of right triangle. Say a = 4, b = 3 then c = 5 Please don't use ^ and sqrt() function.

environ un mois il y a

A résolu


Airline Ticket Mod7 Checksum
There are 13 digits in an airline ticket number. If an airline ticket number is valid, the 13th digit should be the remainder of...

environ un mois il y a

A résolu


Accurate Division
Given three integers x, y and d, return x/y (as a string) to d significant digits. Remove leading and trailing zeros. Example...

environ un mois il y a

A résolu


Determinant without using det()
Given a square matrix A, compute the <http://en.wikipedia.org/wiki/Determinant determinant> of A. Note that you may not use t...

environ un mois il y a

A résolu


Multiplication
Multiply two numbers in a different manner. The numbers are given to you as vectors x and y. Example x = [ 1 2 0 1 ] ...

environ un mois il y a

A résolu


Pi Digit Probability
Assume that the next digit of pi constant is determined by the historical digit distribution. What is the probability of next di...

environ un mois il y a

A résolu


Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.

environ un mois il y a

A résolu


Convert radians to degrees
Given input in radians, output to degrees

environ un mois il y a

A résolu


Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

environ un mois il y a

A résolu


Given a square and a circle, please decide whether the square covers more area.
You know the side of a square and the diameter of a circle, please decide whether the square covers more area.

environ un mois il y a

A résolu


radius of a spherical planet
You just measured its surface area, that is the input.

environ un mois il y a

A résolu


Pi Estimate 1
Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>

environ un mois il y a

A résolu


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

environ un mois il y a

A résolu


Approximation of Pi
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given number of...

3 mois il y a

A résolu


Largest Geometric Series
Extension of Ned Gulley's wonderful Problem 317. In a geometric series, ratio of adjacent elements is always a constant value. ...

3 mois il y a

Charger plus