해결됨

Find the summation, mean, median, mode and standard deviation of a given array.

An array is given. Find out the summation, mean, median, mode and standard deviation of a given array. If x=[1,2,2,3,3,3,4,4,4,...

7달 전

해결됨

Get the combinations

Consider p,q = 2 vectors of same or different length. Get a Output Array which has all the possible combinations of Elements o...

7달 전

해결됨

Creating a code via test suite :)

Given the test suites, create a code that would fit them :) *Clue: Pascal's Triangle

7달 전

해결됨

Draw 'P' !!!

Draw a n by n matrix 'P' using 0s and 1s. (n is odd and greater than 4) if n=5 , then the output will be [1 1 1 1 1 1 0 0 0...

7달 전

해결됨

Rotate Matrix Depending on the input

Rotate matrix (CounterClockwise) via 90, 180 or -90 depending on the input Ex. a = [1 2 3; 4 5 6; 7 8 9] b = 90; ...

7달 전

해결됨

Wythoff Sequence

Find the lower Wythoff sequence up to n. For more information, <https://oeis.org/A000201>

7달 전

해결됨

Free Fall analytical solution (Chapra 2012 textbook Example 1.1)

Analytical solution to bungee jumper problem. Given time series as a vector, parameters mass and drag coefficient, and gravit...

10달 전

해결됨

Odd times 3

Given a input matrix x, multiply all odd values by 3. Even values remain the same. example: x = [1 2 3 4 5;... 6 7...

12달 전

해결됨

Odd times even numbers in a matrix

First count the number of odd numbers in x, then the number of even. Return their product. example: x = [1 2] One odd ...

12달 전

해결됨

Evaluate the gamma function

The <https://mathworld.wolfram.com/GammaFunction.html gamma function> is a generalization of the factorial, and it appears in ma...

12달 전

해결됨

Determine whether a number is a fibodiv number

The number 14 is a fibodiv number because you can divide it into 1 and 4, use those numbers as the seeds for a Fibonacci sequenc...

12달 전

해결됨

Small Riddle

Mr. Smith has two children. If the older child is a boy, what are the odds that the other child is also a boy?

12달 전

해결됨

For given xx,x, y vectors build spline of x and y and find yy values for xx vector.

For given xx,x, y vectors build spline of x and y and find yy values for xx vector. Example x = [ 1.0000 1.5000 2.00...

12달 전

해결됨

For given vectors x,y find coresponding spline coefficients.

For given vectors x,y find coresponding spline coefficients. Example x =[ -3 -2 0 2 3] y =[ 0 0 1 ...

12달 전

문제

Circular Segment Area

Let us consider a circle with radius . If we draw an angle (in radians) from the center of the circle, the two radii forming th...

12달 전 | 2 | 솔버 수: 7

해결됨

Reindex a vector (★★)

(copy of Prob. 676) You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX h...

12달 전

해결됨

*Prime number check 2 (in construction)

Another way to see if a number is prime is to count the number of factors. For example, the number 4 has 2 factors, [ 2 4 ]...

12달 전

해결됨

Matrix Indexing

Given a matrix A and scalars r,c,i, find the product of two elements, with the first element located at row r and column c (doub...

12달 전

해결됨

Right shift an array n times with constant space.

Right shift an array n times with constant space, that is, no extra array can be used. Right shift operation: Last element com...

12달 전

해결됨

Sort the prime numbers in each row of a matrix

Considering a 3x3 matrix A, sort the prime numbers of each row in ascending order. For exemple: input A=[5 8 2 4; ...

12달 전

해결됨

Generate a matrix as follows

write a Function that gives like the following for a random n: n=2 ans= [ 0 1 1 0] n=6 ans= [ 0 ...

12달 전

해결됨

Write script that gives matrix like the following example:)

if x=2; y=[2 1; 1 1] if x=4; y=[4 3 2 1 3 3 2 1 0 2 2 1 0 0 1 1] if x=5; y=[5 4 3 2 ...

12달 전

해결됨

Return a list sorted by number of occurrences

Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x. Ties are resolved by a ...

약 1년 전

해결됨

Monte-Carlo integration

Write a function that estimates a d-dimensional integral to at least 1% relative precision. Inputs: * d: positive integer....

약 1년 전

해결됨

Make a Palindrome Number

Some numbers like 323 are palindromes. Other numbers like 124 are not. But look what happens when we add that number to a revers...

약 1년 전

해결됨

Combine the first and last names

MATLAB R2016 provides a rich set of functions to work with string arrays. In this problem, you will be given two string arrays o...

약 1년 전