Risolto


Replace multiples of 5 with NaN
It is required to replace all values in a vector that are multiples of 5 with NaN. Example: input: x = [1 2 5 12 10 7] ...

oltre 5 anni fa

Risolto


Summy's even sum

oltre 5 anni fa

Risolto


Summy's odd sum

oltre 5 anni fa

Risolto


Doubling elements in a vector (★★)
(copy of prob. 1024) Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] t...

oltre 5 anni fa

Risolto


Factorize uniquely! (★★)

oltre 5 anni fa

Risolto


Create logarithmically spaced values (★)
Given three numbers a,b,n with b>a, create a vector y with n logarithmic spaced values between 10^a and 10^b. Thus, if a = -2, ...

oltre 5 anni 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 5 anni fa

Risolto


Find the smallest prime with n inside

oltre 5 anni 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 5 anni fa

Risolto


Element-wise vector product (★)
Given two vectors x and y, compute their element-wise product z. Thus, if x = [1 3 5] and y = [0.5 -1 2], then z = [1*0.5...

oltre 5 anni 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 5 anni fa

Risolto


Replicate elements in vectors (★★★)
(copy of Prob 867) Replicate each element of a row vector (with NaN) a constant number of times. Examples n=2, A=[1 2...

oltre 5 anni 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 5 anni fa

Risolto


Variance computation (★)
Given a vector x with several values, compute the variance, whose formula is given by: <<https://i.imgur.com/Wg95KBE.gif>> ...

oltre 5 anni fa

Risolto


Magnitude of a vector (★★★)
Given a vector x with values [ x1, x2, x3, ..., xn ], compute the magnitude (or length) of the vector which is given by <<htt...

oltre 5 anni fa

Risolto


Sum of elements of a vector (★★★)
Given any vector x = [x1, x2, x3, ... xn], compute the sum of its elements. Thus, if x = [ 1 3 -2 5 ], then the sum of its el...

oltre 5 anni fa

Risolto


Create a vector with n repeated values of a number x (★★)
If x=3 and n=7 then the vector y would be y=[3 3 3 3 3 3 3]

oltre 5 anni 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 5 anni 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 5 anni 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 5 anni 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 5 anni fa

Risolto


Vector of digits (★★)
Given a positive integer x, construct a vector y with all the digits of x in the order of appearance in x. Thus, if x = 172...

oltre 5 anni fa

Risolto


Polygon Interior Angle Sum
Theorem is (n−2)x180°

oltre 5 anni fa

Risolto


Mile to Kilometer
x is mile and y is km

oltre 5 anni fa

Risolto


Percentage
There is x liter water and y gram => z is percentage of salt in water

oltre 5 anni fa

Risolto


How many apple
You have x apples I take from you y apples now how many apples you have ?

oltre 5 anni fa

Risolto


area

oltre 5 anni fa

Risolto


Find 0 in array
Given array find where there 0 is.

oltre 5 anni fa

Carica altro