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)
Magnus Poulsen
Magnus Poulsen le 2 Déc 2019
Clôturé : MATLAB Answer Bot le 20 Août 2021
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]')

Réponses (1)

KALYAN ACHARJYA
KALYAN ACHARJYA le 2 Déc 2019
Modifié(e) : KALYAN ACHARJYA le 2 Déc 2019

Tags

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by