Creating a vector of stock symbols
Show older comments
Hi everyone I'm attempting to create a vector of stock symbols which I will run through a function to retrieve information about the symbol. When I go to create a vector which I plan to run through the function
symbol=['NLY', 'CSCO', 'RAI'];
it returnes that it's equal to
NLYCSCORAI,
is there a way to make to make it work where the entered symbol in the vector can be used this way? I need it to return 'NLY' to have the function work properly, otherwise there is a breakdown in the program. Also I've found when I do a loop it strips the number of letters specified by the loop instead of treating whats inside of the '...' as a unit.
here is the script if you need the function I can get that as well
symbol=['NLY', 'CSCO', 'RAI'];
[hist_date, hist_high, hist_low, hist_open, hist_close, hist_vol] = get_hist_google_stock_data('symbol');
% Plot Daily Hi vs Low
figure
plot([hist_low,hist_high,log(hist_vol)]);
title('Stock');
xlabel('Days Back');
ylabel('Price');
legend('Blue=Daily High','Green=Daily Low','Red=Log(Volume)')
Accepted Answer
More Answers (0)
Categories
Find more on Common Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!