Filter löschen
Filter löschen

Index exceeds matrix dimensions.

3 Ansichten (letzte 30 Tage)
sairohith mudduluru
sairohith mudduluru am 18 Feb. 2018
Beantwortet: Walter Roberson am 18 Feb. 2018
Soc(1)=1;
DT=1;
for x=2:1:length(time_c)
Soc(x)= Soc(Voc,R,Soc(x-1),battery_energy_city_C,batterypower_city(x-1),DT ); %error in this function
end
length(time_c)=1374
batterypower_city dimension is 1374*1
please help me with this. Thank you.

Antworten (1)

Walter Roberson
Walter Roberson am 18 Feb. 2018
The expression
Soc(Voc,R,Soc(x-1),battery_energy_city_C,batterypower_city(x-1),DT )
is an indexing operation on the vector Soc. If any of the index values after the first one are not 1, then you would be attempting to index outside of the single column of Soc.

Kategorien

Mehr zu System on Chip (SoC) finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by