Index exceeds number of array elements (1)
显示 更早的评论
I continue to get the error "index exceeds number of array elements (1)" regarding the first line of this for loop,
Q_out2=dt*((A(T_night-T_out))/R);
I don't unerstand why because I am not trying to create a vector or matrix on either side. Help?
i=1;
for dt=1:n:7
Q_out2=dt*((A(T_night-T_out))/R);
dT=(Q_out2)/(ctm*mt);
T_current2(i)=T_night-dT;
if T_current2(i)<T_night
Q_furnace2=dt((A*(T_night-T_current2(i)))/R);
if Q_furnace2>30000
Q_furnace2=30000;
end
end
i=i+1;
end
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!