Solved


Rock Paper Scissors Lizard Spock
Can't decide what to watch on TV? How about settling the dispute with a good old fashioned round of Paper Scissors Lizard Spock ...

2 months ago

Solved


Area of a pentagon
Given the side of a regular pentagon and its apothem return the area of pentagon. Remember the area of pentagon is calculate ...

2 months ago

Solved


Construct finite difference approximations of derivatives
In solving a differential equation with a finite-difference method, one computes derivatives with various combinations of the fu...

2 months ago

Solved


Solve a Weird Calculator puzzle
The September 2012 issue of GAMES Magazine had a Weird Calculator puzzle by Erich Friedman. In this puzzle, the calculator has o...

2 months ago

Solved


Count alternating permutations
In an alternating permutation of numbers 1 to n, the numbers are arranged so that they alternately increase and decrease. For ex...

2 months ago

Solved


Construct dimensionless parameters
*Summary* Write a function to construct dimensionless parameters from a list of variables, a matrix indicating their dimensi...

2 months ago

Solved


Let's create histogram data by yourself.
We'd like to create histogram data, which first column shows the data, and second column shows the frequency. input = [1, 2, 1,...

2 months ago

Solved


Find the zeros of the Bessel function of the first kind
<https://mathworld.wolfram.com/BesselFunctionoftheFirstKind.html Bessel functions> are important in many problems in mathematica...

2 months ago

Solved


Pixel density
<https://en.wikipedia.org/wiki/Pixel_density Pixel density> tells us how many pixels we can find within a unit of length. And a...

2 months ago

Solved


Find the position of planet in solarsystem
Write a funtion named *nthplanet* which takes name of the planet as input string and provides the position of the planet, starti...

2 months ago

Solved


Flag a convertible string
If a string is able to be entirely converted to an integer, return a "true" flag. Otherwise, return a false flag. For example: ...

2 months ago

Solved


How to locate the position of an element in a vector without using the find function
(copy of prob 105 with test for find function) Write a function posX = *locatePos* (x,y) which returns the location o...

2 months ago

Solved


Vector of digits (★★)
Given a positive integer x, construct a vector y with all the digits of x in the order of appearance in x. Thus, if x = 172...

2 months ago

Solved


Function minimization - global minimum
Sequel of problem 45951 <https://www.mathworks.com/matlabcentral/cody/problems/45951> Can you do even better, within the r...

2 months ago

Solved


Set the Euler-Mascheroni constant with an identity using available MATLAB functions
Cody Problem <https://www.mathworks.com/matlabcentral/cody/problems/42826 42826> asked us to estimate the <https://en.wikipedia....

2 months ago

Solved


Function minimization - beat fminsearch!
Sequel of problem 45948 <https://www.mathworks.com/matlabcentral/cody/problems/45948-function-minimization-beat-fminbnd> M...

2 months ago

Solved


Function minimization - beat fminbnd!
Matlab's fminbnd function finds a minimizer of a function within an interval. If often gets stuck in local minima. Can you do...

2 months ago

Solved


Bounding Circle
The Bounding Circle is the smallest enclosing circle to a given set of points on a plane <https://en.wikipedia.org/wiki/Smallest...

2 months ago

Solved


Bit to Gigabyte
1 bit = 1.25 × 10^-10 gigabytes | x is bit | y is gigabyte

2 months ago

Solved


Watt
Ampere x Volt = Watt

2 months ago

Solved


Mile to Kilometer
x is mile and y is km

2 months ago

Solved


Polygon Interior Angle Sum
Given the number of sides of a regular polygon, find the sum of interior angles. Return 0 for input for which regular polygon a...

2 months ago

Solved


Kelvin to Fahrenheit
You can find a doc about it in here => https://www.rapidtables.com/convert/temperature/how-kelvin-to-fahrenheit.html x is kelvi...

2 months ago

Solved


Convert Angstrom to Meters
Write a code that converts the angstrom unit to meters.(A is angstrom and m is meters.)

2 months ago

Solved


Given A4 sizes find A3's long side
I think you know the relation between A3 and A4 paper so givens are sides of A4 x1=long side of A4 y1=short side of A4 y2 is ...

2 months ago

Solved


Compute the Bernoulli numbers
The <https://en.wikipedia.org/wiki/Bernoulli_number Bernoulli numbers> appear in several applications in number theory, includin...

2 months ago

Solved


Make a checkerboard matrix (★★★★★)
(copy of Prob. 4) Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1...

2 months ago

Solved


Sum of elements in a vector (★)
(copy of Prob. 3) Find the sum of all the numbers of the input vector x. Input x = [1 2 3 5] Output y is 11 <> ...

2 months ago

Solved


Sum of elements of a vector (★★★)
Given any vector x = [x1, x2, x3, ... xn], compute the sum of its elements. Thus, if x = [ 1 3 -2 5 ], then the sum of its el...

2 months ago

Solved


Magnitude of a vector (★★★)
Given a vector x with values [ x1, x2, x3, ..., xn ], compute the magnitude (or length) of the vector which is given by href ...

2 months ago

Load more