Question: Question 1a. Problem Definition For this question start by saving 91.m as q1a.m. In this script you will implement MATLAB code that uses a for-loop

Question 1a. Problem Definition For this question start by saving 91.m as q1a.m. In this script you will implement MATLAB code that uses a for-loop to create a new vector B that contains the cubes of the numbers in A. Note that the cube of any number is that number multiplied by itself three times. Thus the cube of 2 is 2x2x2=8 and the cube of 3 is 3x3x3=27. Note also, your program has to work for any contents of A in the range - 100 to 100 (not just the numbers currently in A). Testing For this question you should, in a text file called, q1a.txt write a table containing three new test cases. As a reference example, two possible test cases for this are: B [1 2 3] [1 8 27] [-1 0 1] [-1 0 1] Remember to write your test cases in the format above into your q1a.txt file. Coding Now code your solution to the problem above in your q1a.m file. Make sure you include some code at the end to display the vector B
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
