Risolto


Number Puzzles - 016

oltre un anno fa

Risolto


Number Puzzles - 015

oltre un anno fa

Risolto


Compute the harmonic numbers
The nth <https://mathworld.wolfram.com/HarmonicNumber.html harmonic number> is defined as the sum of the reciprocals of the inte...

oltre un anno fa

Risolto


Generate a list of composite numbers

oltre un anno fa

Risolto


Ohm's Law
Well its Ohm's law... So V = IR! I will give two of the three values, such as V and I or I and R and you have to return th...

oltre un anno fa

Risolto


Finding neighbors of [-1:1] in a matrix....
Hello All! Well I found this one fun to figure out, all you have to do is make a matrix of 1's or 0's (true or false) that sh...

oltre un anno fa

Risolto


Find the gcm of n given values
Create a function that given n integer values greater than zero, finds the two numbers with the greatest common divisor and retu...

oltre un anno fa

Risolto


Gapful numbers
If a number is divisible by the number formed by the first and last digit of that number then it is defined as a gapful number. ...

oltre un anno fa

Risolto


Highest powers in factorials
This is the inverse of the problem <https://www.mathworks.com/matlabcentral/cody/problems/44747 Exponents in Factorials>. Inste...

oltre un anno fa

Risolto


Average valid values of arrays
Given a 1D array (column or row vector), compute the average of valid values. Valid values are defined via two thresholds: minVa...

oltre un anno fa

Risolto


Ring Matrix
Given n (only odd), return output matrix a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. ...

oltre un anno fa

Risolto


Median computation (★)
Given a vector of values, compute the median. The median is defined as the middle value in a set of *sorted* data. Thus, if ...

oltre un anno fa

Risolto


Function 1 (★)
Compute the value of <<https://i.imgur.com/AxKWLmE.gif>> for any given positive x.

oltre un anno fa

Risolto


PEMDAS test (★★)
Create the function that will return the following expression for x and y. <<https://i.ibb.co/RHWyzrv/Code-Cogs-Eqn-1.gif>> ...

oltre un anno fa

Risolto


Get the elements of diagonal and antidiagonal for any m-by-n matrix (★★★★)
(copy of prob. 859) In this problem you must submit a solution which returns the diagonal and anti-diagonal elements without ...

oltre un anno fa

Risolto


Sum of terms in a series 1 (★★★)
Given x and n, compute the following sum: |x|+|x|^(1/2)+|x|^(1/3)+|x|^(1/4)+|x|^(1/5) ... + |x|^(1/n) where ||x|| indica...

oltre un anno fa

Risolto


Sum of terms in a series 2 (★★★)

oltre un anno fa

Risolto


Vector creation using linspace
Create a vector y containing n uniformly spaced values between a and b, with a < b. Use linspace.

oltre un anno fa

Risolto


Fill a zeros matrix (★★★★★)
(Copy of Problem 830) The aim is to fill an array of all zeros given a numerical value and the index of row and columns for t...

oltre un anno fa

Risolto


Factorize uniquely! (★★)

oltre un anno fa

Risolto


Generate n equally spaced "intervals" between -x and x (★)
Given n and x, return a list of numbers (in ascending order) that divides the interval [-x x] into n equal-length intervals. ...

oltre un anno fa

Risolto


Generate a vector which contains a pyramid pattern (★★★★)
Generate a vector that contains terms that follows a pyramid pattern up to the nth row: 1 2 2 3 3 3 4 4 4 4 ...

oltre un anno fa

Risolto


Sum of elements in a vector (★)
(copy of Prob. 3) Find the sum of all the numbers of the input vector x. Input x = [1 2 3 5] Output y is 11 <> ...

oltre un anno fa

Risolto


Mo money, mo math 1! (★★★)
(adapted from Prob 9 Cody team) You have a vector where the elements represent the number of $20 bills, $10 bills, $5 bills, ...

oltre un anno fa

Risolto


Remove the row average (★★★)
(copy of Prob. 963) Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solut...

oltre un anno fa

Risolto


Select every other element of a vector (★★)
(copy of prob 6) Write a function which returns every other element of the vector passed in. That is, it returns the all odd-...

oltre un anno fa

Risolto


Swap the first and last columns (★★)
(copy of Prob 19) Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becom...

oltre un anno fa

Risolto


Mo money, mo math #2! (★★★)
(adapted from Prob 9 Cody team) You have a matrix for which each row is a person and the columns represent the number of quar...

oltre un anno fa

Risolto


Prime number check (★★)
One way to see if a number x is prime is to compute the remainders obtained when dividing x by all integers from 2 to √(x). If x...

oltre un anno fa

Risolto


Vector creation using colon operator
Create a vector y containing n uniformly spaced values between a and b, with a < b. Use the colon (:) operator.

oltre un anno fa

Carica altro