Answered step by step
Verified Expert Solution
Question
1 Approved Answer
WANT 6 , 7 AND 9 . PLEASE ANSWER THOSE. 6 , 7 AND 9 . USE MATLAB, ANSWER # 6 , # 7 AND
WANT AND PLEASE ANSWER THOSE. AND USE MATLAB, ANSWER # # AND #; OTHER QUESTIONS ARE THERE FOR CONTEXTTask #: Generate a columnvector with random values between and using the rand function. Name this randCol.Task #: Generate a rowvector with random whole numbers between and using the randi function. Name this randRow. Task #: Delete the last elements of the vector randRow using the vectorindexing and the end keyword.Task #: Using the linspace function, create a vector of evenly spaced values ranging from pi to pi Name this vector piRange.Task #: Update the vector piRange to swap the first and last elements.Task #: Save the values at indexes and in that order, from the vector piRange above to a new vector called outOfOrder. Use vectorindexing to access those values.Task #: Using the linspace function, generate a vector named linspace with the same values that result from this colon notation expression : : Task #: Uncomment the code that you see below. Try running the script again to see the error that occurs. You see this error because the second line of code is attempting to access the value at index ten of the vector taskVector. This vector only has elements, therefore index ten is out of bounds and causes an error. Update the code below to instead extend this vector by setting the value at index ten to We talked about using an outofbounds element assignment to extend a vector in class.Task #: Using linspace, create the following row vectors, and save them to any variable name you choose. Task #: See the vector below called inventory. This vector represents both the price and quantity sold of items from a clothing store. The odd indexes, represent the quantity sold of a given item and the value immediatlely to the right is the corresponding price. Create a vector called revenue which will store the sales revenue of each item quantity sold price. Do not manually copy & paste values instead use vector indexing and elementwise multiplication, to solve this problem. For reference, revenue should have values, and the first value should be quantitypriceTask #: Find the sum of the first elements in the harmonic series: You can use vector elementwise division in a couple of different ways to generate a vector that houses the above series of numbers. You can then use the sum function to add all elements of that vector together. Save this sum to a new variable called sumHS.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started