Subscripted assignment dimension mismatch.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
fede
am 14 Mär. 2016
Bearbeitet: Walter Roberson
am 14 Mär. 2016
Hi
I have the vector price <1xn struct> in which we have a several information about a price of a stock. I want to have a vector in which we have all tickers name of the stock, with the following:
nome=zeros(size(price));
for t=1:size(price,2);
nome(1,t)= price(1, t).Ticker;
end
but I have the error: Subscripted assignment dimension mismatch.
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 14 Mär. 2016
It is not possible to have a vector of strings in MATLAB, because strings are really vectors of characters. You will need to use cell arrays of strings:
nome{1,t} = price(1, t).Ticker;
4 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Whos finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!