A résolu


Replicate elements in vectors
Replicate each element of a row vector (with NaN) a constant number of times. Examples n=2, A=[1 2 3] -> [1 1 2 2 3 3] ...

presque 6 ans il y a

A résolu


Assess the scatter of wind turbines in a field
The renewable energy industry is on the rise in many countries--- and one of the key players is wind energy. It is believed ...

presque 6 ans il y a

A résolu


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

presque 6 ans il y a

A résolu


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]

presque 6 ans il y a

A résolu


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

presque 6 ans il y a

A résolu


Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as |y = A.ⅇ^(-λt)*cos(2πft)| where |A|, |λ|, and |f| ...

presque 6 ans il y a

A résolu


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

presque 6 ans il y a

Problème


Vector raised to a power (element-wise)
Given a vector A and a number x, raise each element of the vector to the power of x. Thus, if A = [2 5 7 1] and x = 0.5, then ...

presque 6 ans il y a | 0 | 131 solveurs

Problème


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

presque 6 ans il y a | 0 | 141 solveurs

Problème


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

presque 6 ans il y a | 0 | 116 solveurs

Problème


Create a vector of the first n naturnal numbers
If n = 7, your program should return a vector y, where y = [1 2 3 4 5 6 7].

presque 6 ans il y a | 0 | 139 solveurs

Problème


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]

presque 6 ans il y a | 0 | 112 solveurs

Problème


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

presque 6 ans il y a | 0 | 113 solveurs

Problème


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

presque 6 ans il y a | 0 | 104 solveurs

A résolu


Create a vector of n alternating ones and zeros
Given n, your output should be a vector y of numnbers such that the first number is 1 and the numbers following it alternate bet...

presque 6 ans il y a

Problème


Create a vector of n alternating ones and zeros
Given n, your output should be a vector y of numnbers such that the first number is 1 and the numbers following it alternate bet...

presque 6 ans il y a | 0 | 114 solveurs

A résolu


Create a vector of the first n odd numbers
If n = 10, your program should return a vector y, where y = [1 3 5 7 9 11 13 15 17 19].

presque 6 ans il y a

Problème


Create a vector of the first n odd numbers
If n = 10, your program should return a vector y, where y = [1 3 5 7 9 11 13 15 17 19].

presque 6 ans il y a | 2 | 133 solveurs

A résolu


Product of a and b
return the value of c = a*b

presque 6 ans il y a

A résolu


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

presque 6 ans il y a

A résolu


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

presque 6 ans il y a

A résolu


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

presque 6 ans il y a

A résolu


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

presque 6 ans il y a

A résolu


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

presque 6 ans il y a

A résolu


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

presque 6 ans il y a

A résolu


Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

presque 6 ans il y a

A résolu


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

presque 6 ans il y a

A résolu


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

presque 6 ans il y a

A résolu


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

presque 6 ans il y a

A résolu


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

presque 6 ans il y a

Charger plus