Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

RQ 1 5 - 1 6 following questions. Each should be answered with a single MATLAB statement if possible. ( a ) Place the abbreviation

RQ 15-16
following questions. Each should be answered with a single MATLAB statement if possible.
(a) Place the abbreviation of the stock with the highest current price in CurrentHigh.
(b) Place the abbreviation of the stock with the lowest purchase price in Cheapest.
(c) Create a single row M-element cell array named Best containing the abbreviations of all stocks that have increased in value by more than 25%.
Number of shares.)
(e) Place the total profit that would be made by selling all of the shares from the preceding question into the variable TotalProfits.
Script o.
%% Variables to be used
% Inputs
% Stocks - cell array containing
% top element - cell array containing single row of stock abbreviations (character arrays)
% bottom element - matrix 3N matrix of purchase price (row 1), current price (row 2), and number of stocks (row 3)
% outputs
% CurrentHigh - character array of stock with the highest current price
% Cheapest - character array of stock with the lowest purchase price
% Best - cell array containing character array of stocks which have increased by 25% in value
% Profits -21 cell array containing
% element 1- single-row cell array of stocks found in Best
% element 2- single-row vector contain profit from selling each stock in Best
% Totalprofits - scalar containing total profit from selling all stocks in Best
%% Inputs
Generate_Stocks % This script generates the cell array Stocks.
%% Program
% Write your program here
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2010 Barcelona Spain September 2010 Proceedings Part 2 Lnai 6322

Authors: Jose L. Balcazar ,Francesco Bonchi ,Aristides Gionis ,Michele Sebag

2010th Edition

364215882X, 978-3642158827

More Books

Students also viewed these Databases questions