解決済み


return odd numbers
Return odd numbers in an vector

4年弱 前

解決済み


find the position of the given number in vector
return the position of the number in vector

4年弱 前

解決済み


Determine if a number is prime
A prime number is a whole number greater than 1 whose only factors are 1 and itself.

4年弱 前

解決済み


Find the nth term in an Arithmetic Progression
Given the starting number, difference and number of elements - find the nth term in the AP

4年弱 前

解決済み


Sum of Arithmetic Progression
Given the starting number, difference and the number of terms - find the sum of the arithmetic progression.

4年弱 前

解決済み


Find two numbers that add up to the target value
Given a vector A and target n, return the indices of two numbers that add up to n. If there are multiple solutions, return the f...

4年弱 前

解決済み


True engineer
Prove that pi is indeed equal to e. Return 1 by rounding pi and e to the nearest integer then asserting rounded pi and e are eq...

4年弱 前

解決済み


Absolute Value of the Product of Complex Numbers
Find the absolute value (modulus) of the product of two complex numbers given by a + bi and c + di.

4年弱 前

解決済み


Length of shortest path in a directed graph.
Given a directed graph and a start and end node in the graph, return the minimum number of hops required to reach the end node f...

4年弱 前

解決済み


Time and Variable mapping and matching
There is a 6X5 cell array where * 1st column represents time values * 2nd and 3rd column represent variables and their value...

4年弱 前

解決済み


Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3

4年弱 前

解決済み


Trap a knight
Consider a knight on an infinite chessboard labeled with numbers spiraling outward. A knight starting on the square labeled 1 ca...

4年弱 前

解決済み


Flip the parity of digits in a decimal expansion
The number 349 has the decimal expansion . If we change the even digits from positive to negative, then the number becomes 269 (...

4年弱 前

解決済み


Count the peaceful queens
In a 5x5 chessboard with a queen of one color (white, say) on the perimeter, one can place 12 black queens on the board such tha...

4年弱 前

解決済み


test
test

4年弱 前

解決済み


Find the length of stream affected by a spill
When a contaminant is spilled into a stream, one might want to know how much of the stream is affected—e.g., the length over whi...

4年弱 前

解決済み


Evaluate the generalized hypergeometric function
The <https://en.wikipedia.org/wiki/Generalized_hypergeometric_function generalized hypergeometric function> is defined as <<...

4年弱 前

解決済み


List odd twin composites
Twin primes, or prime numbers that differ by 2 (e.g., 17 and 19, 59 and 61, or 191 and 193), are the subject of several Cody pro...

4年弱 前

解決済み


Hyperperfect Numbers
A k-hyperperfect number is a natural number n for which the equality n = 1 + k(σ(n) − n − 1) holds, where σ(n) is the divisor ...

4年弱 前

解決済み


Count the ways to make Scorigami
Regarding the sport known as American football, some people are such rabid fans that they can tell you the statistics of every p...

4年弱 前

解決済み


Calculate FFT
Calculate the fft manually, without using matlab's builtin function. No cheating allowed.

4年弱 前

解決済み


Fast Fourier transform algorithm
Your task is to implement the Fast Fourier transform algorithm, without using builtin MATLAB fft commands e.g. fft, fft2, or har...

4年弱 前

解決済み


Solve an ODE: concentrations predicted by the cells-in-series model
One approach for predicting mixing and transport of contaminants in a river is the cells-in-series model. The model divides a ri...

4年弱 前

解決済み


Local Extrema
Given a 2D (m,n>1) matrix, replace an element if it is not a local extrema (minima/maxima), with 0 (zero). Check the 3 neighbou...

4年弱 前

解決済み


From sorted to original
Given a soted list (vector) and the indexes list., how can we retrieve the original one. Example: The sorted is: sv=[-1 0 2 5...

4年弱 前

解決済み


Flip the right coin to survive!
Write a function to solve the problem mentioned below. The chessboard 8x8 matrix will be filled with coins randomly and given to...

4年弱 前

解決済み


Weird Diagonal Matrix!!
Given an integer n, create a matrix whose diagonal elements will be square matrices of size 1 to n. For example: n=2 z = ...

4年弱 前

解決済み


Compute the period of a pendulum started from a finite initial angle
Cody Problem 49830 asks for the period of a pendulum swinging through a small angle. Here the pendulum started at rest from an ...

4年弱 前

解決済み


Leyland Primes
A Leyland Number is defined as a number of the form - x^y + y^x, or, x^y - y^x (x,y)>1 Given an array of numbers(>1), check...

4年弱 前

解決済み


Draw a Diamond shape in ones Matrix with '0' s
Input will be odd numbers.The task is to make a Diamond shape in a ones matrix with '0's where the matrix will be a square matri...

4年弱 前

さらに読み込む