Solved


Easy Sequences 116: Summation involving nthroot, floor, and ceiling functions
Given a postive integers and , we are asked to evaluate the following summation: ...

1 month ago

Solved


Easy Sequences 115: Integral involving square root, floor, and round functions
Given a postive real number , we are asked to evaluate the following integral: ...

1 month ago

Solved


Easy Sequences 114: Counting Unique Numbers
A Unique Number is defined as a positive integer with no repeated digits. This means that and are unique numbers, but and ar...

1 month ago

Solved


Easy Sequences 112: Almost Golden Integer Rectangles 1
A golden rectangle is a rectangle whose side lengths are in the golden ratio, , where: . ...

1 month ago

Solved


Find a number m such that 2m and the square of m have the same digit sum
The number has the property that and have the same digit sum. It is the seventh number, including zero, in the sequence of nu...

1 month ago

Solved


Easy Sequences 110: Integration of the Sum of a Recursive Trigonometric Function
A trigonometric function, , is defined as follows: , in radians Applying recursively we define another funct...

1 month ago

Solved


Easy Sequences 109: Summation of Derivatives of a Trigonometric Function
A trigonometric function, , is defined as follows: where: ; and ...

1 month ago

Solved


Sequence Vectorization - II
This is the second part to the question - Sequence Vectorization - I Given an array of Natural numbers, N, return the sequence ...

1 month ago

Solved


Sequence Vectorization - I
Given a Natural number N, return the sequence - [1 1 2 1 2 3 1 2 3 4 ... 1 2 3 ... N-3 N-2 N-1 N] i.e. the horizontal concatenat...

1 month ago

Solved


Create an empty array
Suppose you need an empty array. e = [] will give you one, but it's a double array, which may not help if you need a differen...

1 month ago

Solved


Compute flow in a partially full pipe
Problem statement When does the maximum flow occur in a pipe? Intuition might suggest that it occurs when the pipe is flowing f...

1 month ago

Solved


Easy Sequences 108: Enclosing a Circle with Primitive Pythagorean Triangles
Pythagorean Triangle is a right triangle all sides of which are represented by integers. Examples are triangles with sides and ...

1 month ago

Solved


Easy Sequences 102: One-line Code Challenge - Take While Function
takeWhile is another useful functional programming construct. The takewhile function is similar to the built-in function arrayfu...

1 month ago

Solved


Compute the critical depth of a channel
Problem statement Write a function to compute the critical depth of a channel with discharge . The unit system will be specifie...

1 month ago

Solved


Compute the normal depth of a channel
For steady uniform flow in a channel of constant cross section and slope, the depth does not change with distance or time. In th...

1 month ago

Solved


Route a hydrograph through a river section with the Muskingum method
Problem statement Write a function that routes a hydrograph through a river section using the Muskingum method. The input to t...

1 month ago

Solved


Compute infiltration and runoff under constant precipitation with the Green-Ampt method
Problem statement Write a function that computes infiltration, depression storage, and runoff using the Green-Ampt method. It s...

1 month ago

Solved


Find the circle inscribed in a triangle
Write a function that takes the x- and y-coordinates of three points describing the vertices of a triangle and returns the cente...

1 month ago

Solved


Suma de Gauss
¿Cuál es la suma de los primeros enteros positivos?

1 month ago

Solved


Continuous NaNs - I
Remove any continuous NaNs that appear in the array - %Example 1 input = [1 NaN 2 NaN NaN 3 NaN NaN NaN] output = [1 NaN 2 ...

1 month ago

Solved


Calculate the Voltage Through a Step-Up Transformer
Given a step-up transformer has a primary coil with A number loops, a secondary coil with B number loops, and a primary voltage ...

1 month ago

Solved


Find the mean of the magic x
Given a x term, find the magic x, then find the mean/average of any one row or column.

1 month ago

Solved


factorial_calc(n)
Write a MATLAB function called factorial_calc(n) that takes a positive integer n as input and calculates the factorial of n. The...

1 month ago

Solved


Find circular arc length, sector area and segment area
Given a circular arc passing through the points P = [ x1 y1 ] and Q = [ x2 y2 ] such that the center angle of the arc (in degree...

1 month ago

Solved


Given a string s, find the length of the longest substring without repeating characters.
Given a string s, find the length of the longest substring without repeating characters. Example 1: Input: s = "abcabcbb" O...

1 month ago

Solved


Determine the minimum number of swaps to sort a vector
Cody Problem 1401 asks us to sort a vector with the bubble sort algorithm and count the number of swaps needed. For example, to ...

1 month ago

Solved


Easy Sequences 104: One-line Code Challenge - GCDs of Sum of Consecutive Cubes
For a natural number, n, the function CC(n) is defined as follows: In other words, CC(n) is the sum of cubes ...

1 month ago

Solved


Easy Sequences 105: One-line Code Challenge - IPv4 Address Validation
The Internet Protocol version 4 (IPv4) is the dominant protocol for routing devices over the internet. IPv4 addresses are usuall...

1 month ago

Solved


Given the mass and stiffness of an undamped SDOF system, find the natural frequency and the natural period of vibration
Problem Statement Given the mass and stiffness of an undamped SDOF system, find the system's natural frequency in both Hz and...

1 month ago

Solved


Calculate BMI
Given weight in kgs and height in metres, calculate body mass index

1 month ago

Load more