解決済み


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

6年弱 前

解決済み


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

6年弱 前

解決済み


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

6年弱 前

解決済み


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]

6年弱 前

解決済み


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

6年弱 前

解決済み


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

6年弱 前

解決済み


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.

6年弱 前

問題


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

6年弱 前 | 0 | 131 個のソルバー

問題


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

6年弱 前 | 0 | 141 個のソルバー

問題


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

6年弱 前 | 0 | 116 個のソルバー

問題


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

6年弱 前 | 0 | 139 個のソルバー

問題


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]

6年弱 前 | 0 | 112 個のソルバー

問題


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

6年弱 前 | 0 | 113 個のソルバー

問題


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

6年弱 前 | 0 | 104 個のソルバー

解決済み


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

6年弱 前

問題


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

6年弱 前 | 0 | 114 個のソルバー

解決済み


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

6年弱 前

問題


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

6年弱 前 | 2 | 133 個のソルバー

解決済み


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

6年弱 前

解決済み


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]

6年弱 前

解決済み


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

6年弱 前

解決済み


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

6年弱 前

解決済み


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

6年弱 前

解決済み


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

6年弱 前

解決済み


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

6年弱 前

解決済み


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

6年弱 前

解決済み


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

6年弱 前

解決済み


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

6年弱 前

解決済み


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

6年弱 前

解決済み


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

6年弱 前

さらに読み込む