문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


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.

2개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


Find gradient of a numeric data which has same size as the existing vector.
**** Refer matlab documentation about finding gradient **** Convert the entire gradient vector to least integer form. (Probably...

2개월 전

문제를 풀었습니다


Solve an ODE: draining tank
Write a function to compute the time to drain a cylindrical tank of diameter from an initial level to a level . The outflow oc...

2개월 전

문제를 풀었습니다


Armstrong Number
Write a function name armstrong_check that checks whether the given input is an Armstrong Number or not. It returns logical True...

2개월 전

문제를 풀었습니다


Zero finder
Write a function named 'zero_finder' that takes a matrix as input and returns the row index of the last zero for each for each c...

2개월 전

문제를 풀었습니다


Easy Sequences 97: One-line Code Challenge - Sequence with Constant Difference
While answering Problem #57725, I noticed a pattern that immediately led me to a solution, namely: the -th difference of the seq...

2개월 전

문제를 풀었습니다


Inscribe a circle in a triangle with a side of length equal to the circle’s circumference
A circle of radius is inscribed in a triangle with a side that has a length equal to the circle’s circumference. The center of ...

2개월 전

문제를 풀었습니다


Number of images formed due to two inclined mirrors and their coordinates
There are two mirrors with angle theta between them and there is an object on x axis. Determine the number of images formed and ...

2개월 전

문제를 풀었습니다


Determine whether a hydrograph is a unit hydrograph
A hydrograph describes the runoff response of a catchment or watershed to rainfall. It shows the runoff rate (or flow or discha...

2개월 전

문제를 풀었습니다


Easy Sequences 101: One-line Code Challenge - n-th Digit of Fibonacci Sequence
For a given index , the -th Fibonacci number, is defined as: for or , and for . What this problem requires is find the dig...

2개월 전

문제를 풀었습니다


Radius of an inner N-dimensional sphere
A hypercube is an N-dimensional analogue of a square (N=2). Similarly, an N-sphere is an N-dimensional analogue of a circle. Not...

2개월 전

문제를 풀었습니다


Easy Sequences 100: One-line Code Challenge - 100th Digit of 100th power of an Integer
Given a integer , write a function that computes the digit of . If has less than digits just output a NaN. For example if , ...

2개월 전

더 보기