Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Help i get this error: Array indices must be positive integers or logical values. Error in simulering (line 35) plot(v(t),t)
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!