Solved


Easy Sequences 93: Recursive Polynomial Function
For a natural number and a polynomial function , we define a recursive function , as follows: , and ...

4 months ago

Solved


Return the 'Size' of a String of Code
One of the most 'mysterious' parts of playing Cody is the sizing system. Given a string of commands, return the size that Cody w...

4 months ago

Solved


Tune your guitar
Given an input string with the scientific pitch notation for standard tuning ( <http://en.wikipedia.org/wiki/Guitar_tunings#Stan...

4 months ago

Solved


Return the Square of a Number
Write a function that takes a single numeric input x and returns its square. That is, given x, your function should output x^2....

4 months ago

Solved


Slicing the area of a circle
Given the area, A, of a square, consider a circle having the area, πA, and the radius, r. For a given slicing number n>1, find ...

4 months ago

Solved


Express base-10 integers in lazy binary
The binary (or base-2) representations of a number n can be constructed as follows: Step 1: If n = 0, then the binary represent...

4 months ago

Solved


Slicing the area of a regular polygon
Given the area, A, of a regular polygon with n sides, each of length s, consider its decomposition in congruent isosceles triang...

4 months ago

Solved


Calculate Reynolds Number
Write a MATLAB function that calculates the Reynolds number for flow over a flat plate: ​ ρ = fluid density (kg/m³) V = veloc...

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

4 months ago

Solved


Calculate Drag Force
Write a MATLAB function to compute the drag force on an object moving through air: ​ where: D is drag force (N) ρ is air de...

4 months ago

Solved


Calculate Lift Force on an Airfoil
Write a MATLAB function to calculate the lift force acting on an airfoil given the air density, wing area, velocity of the airfl...

4 months ago

Solved


Easy Sequences 95: LCM Sums
For a given , write the function lcmSum(n), defined as follows: For example for : >> lcmSum = @(n) sum...

4 months ago

Solved


Easy Sequences 94: GCD Sums
Given positive integer , write the function gSum(x), that sums all the GCD's of the integer pairs . For example in the Excel scr...

4 months ago

Solved


Easy Sequences 89: Double Summation of a Trigonometric Product
Given and angle in radians and a positive integer , evaluate the following product summation: which 'dir...

4 months ago

Solved


Write a cubic formula function
Create a function that will output the three roots of a cubic equation specified by the 4 coefficients listed as input. The outp...

4 months ago

Solved


another bullseye
create matrix like below -- for x=2, y=[1 1 1 1 1; 1 2 2 2 1; 1 2 3...

4 months ago

Solved


Decoder Ring
You are given a matrix of numbers, your objective is to use the decoder ring to find the hidden message. ex. encoded_messa...

4 months ago

Solved


Extract part elements of matrix into one new matrix
Given a matrix that includes different nonzero and zero entries, extract the nonzero elements and form a new matrix. The new mat...

4 months ago

Solved


Generate this matrix
For a given odd integer n, generate a matrix as follows: Input: n = 5; Output: [ 2 1 0 0 0 1 ...

4 months ago

Solved


How many ways to write a number
Given two positive numbers n and k, where n>=k. In how many ways can we write n as sum of k positive numbers. Same numbers but d...

4 months ago

Solved


Usage of java.math : Add, Multiply, Pow
This challenge is an introduction to the wonderful word of java.math that allows unlimited precision calculations. The primary ...

4 months ago

Solved


Is my wife really right?
For every input, output the string 'yes' once. Example: [yes1, yes2] = YesSheIs('Am I right?', 'Do you love me?') yes1 = 'yes'...

4 months ago

Solved


Coin change combinations.
Using only pennies (1), nickels (5), dimes (10), quarters (25), half dollars (50), and dollars (100), how many different combina...

4 months ago

Solved


Simpsons's rule (but not Homer Simpson)
I wonder what Homer Simpson would have thought of Simpson's rule? Somehow I doubt his thoughts would have included the phrase Ne...

4 months ago

Solved


speed vs size
The given string describes some MATLAB expressions such as 'pause(1)'. Compute its performance score = code size + run time in m...

4 months ago

Solved


Word Distance - Average Sort
Based on the method of <https://www.mathworks.com/matlabcentral/cody/problems/44815-word-distance-sum this problem>, write a fun...

4 months ago

Solved


Abelian Sandpile - 01
Generate a matrix like abelian sandpile where the center of the matrix is n. For example, n=3 out=[0 0 0 0 ...

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

4 months ago

Solved


Angles of the hands of a clock
For this problem, consider an analog (or at least continuous digital representation) of a clock. Our clock is a 12 hour clock w...

4 months ago

Solved


Composite Trapezoidal Rule for Numeric Integration
Use the trapezoidal rule to numerically integrate a function, _f(x)_, passed as the first argument, between upper and lower limi...

4 months ago

Load more