Resuelto


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

más de 3 años hace

Resuelto


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

más de 3 años hace

Resuelto


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

más de 3 años hace

Resuelto


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]

más de 3 años hace

Resuelto


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

más de 3 años hace

Resuelto


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

más de 3 años hace

Resuelto


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

más de 3 años hace

Resuelto


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

más de 3 años hace

Resuelto


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

más de 3 años hace

Resuelto


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

más de 3 años hace

Resuelto


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

más de 3 años hace

Resuelto


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

más de 3 años hace