필터 지우기
필터 지우기

Index exceeds matrix dimensions.

조회 수: 3 (최근 30일)
sairohith mudduluru
sairohith mudduluru 2018년 2월 18일
답변: Walter Roberson 2018년 2월 18일
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.

답변 (1개)

Walter Roberson
Walter Roberson 2018년 2월 18일
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.

카테고리

Help CenterFile Exchange에서 System on Chip (SoC)에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by