Question: This is using the MATLAB program 6. The vectors below contain prices in dollars of three different stocks. The prices indicate the stock value each
This is using the MATLAB program
6. The vectors below contain prices in dollars of three different stocks. The prices indicate the stock value each day for 10 days. Stock 1=[19 18 22 21 25 19 17 21 27 29] Stock2=122 17 20 19 24 18 16 25 28 27] Stock3=[17 13 22 23 19 17 20 21 24 28] Write a script that: Determines how many days the price of stock 1 was above the prices of both stocks 2 and 3. Determines how many days the price of stock 1 was above the prices of either stocks 2 or 3. Determine how many days the price of stock 1 was above the price of stock 2 but below the price of stock 3. Use fprintf statements to output your calculations for a-c. 7. Create a vector of 40 random numbers using the following command: x = randperm(40). Then evaluate the vector y using the following set of equations: y(x) = 2 for x
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
