Info
This question is closed. Reopen it to edit or answer.
Help i get this error: Array indices must be positive integers or logical values. Error in simulering (line 35) plot(v(t),t)
1 view (last 30 days)
Show older comments
clear all;
close all;
clc;
load('GaugeDataPart01.mat','INTtimeSERIE')
load('gaugeData.mat','event_summary')
%konstanter
t=INTtimeSERIE(:,1);
I=INTtimeSERIE(:,2);
Fred=5.70492; %Ha
Qud=1*Fred; %l/s/Ha
alpha=0.76;
c=28070;
f=1;
v=@(t) Fred*(f*c*t.^-(0.76).*t-Qud*t);
v=@(t) v(t-1)+f*I*Fred-Qud;
if v(t)>=0
v(t)=v(t-1)+f*I*Fred-Qud;
else
v=0;
end
plot(v(t),t)
datetick('x','mm-yy')
xlabel('dato')
ylabel('volumen [m^3]')
0 Comments
Answers (1)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!