Question: MATLAB Function: stockPortfolio lnput(s): - (double) Nx3 array of information about a stock portfolio Output(s): - (char) 1xM vector of characters with an action you
MATLAB

Function: stockPortfolio lnput(s): - (double) Nx3 array of information about a stock portfolio Output(s): - (char) 1xM vector of characters with an action you should take Function Description: characters containing a recommended action following the guidance below: - When the valuation of every stock decreases (i.e. negative percent valuation change), your recommendation output should be 'sell out' - When the overall gross valuation change is negative, your recommendation output should be 'sell out' Examples: 1020000.05; 550000.10]; out = stockPortfolio(stocks) % out = "buy 1 " stocks =[10010000.10; 1020000.05; 550000.10; 2510000.20]; out = stockPortfolio(stocks) stocks =[10010000.50] 1030000.5; 5050000.20; 2510000.20]; out = stockPortfolio(stocks) % out = 'sell out
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
