Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 programimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions