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)
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]')

Answers (1)

KALYAN ACHARJYA
KALYAN ACHARJYA on 2 Dec 2019
Edited: KALYAN ACHARJYA on 2 Dec 2019
plot(v,t)

Tags

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!