Info
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
simulering.m Line: 17 Column: 7 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
clear all;
close all;
clc;
load('GaugeDataPart01.mat','INTtimeSERIE')
%konstanter
t=INTtimeSERIE(:,1);
i=(INTtimeSERIE(:,2)); %omregning fra mm/min til l/s/h
F_red=5.70492; %Ha
Q_ud=1*F_red; %l/s/Ha
alpha=0.76;
c=28070;
f=1;
for v_(size(t))=v_(size(t)-1)+f*i*F_red-Q_ud;
end
if v>=0
v=v(t-k)+f*i*F_red-Q_ud;
elseif v==0
v=0;
Q_ud=0;
end
plot(t,V(t))
datetick('x','mm-yy')
xlabel('dato')
ylabel('volumen [m^3]')
0 Commenti
Risposte (1)
Steven Lord
il 2 Dic 2019
for v_(size(t))=v_(size(t)-1)+f*i*F_red-Q_ud;
That's not valid MATLAB syntax. It looks like you may be trying to create variables with sequentially numbered names (v1, v2, v3, ...) and if you are that's strongly discouraged. See this Answers post for some of the reasons why that's discouraged.
If you describe what exactly you're trying to do with that for statement we may be able to offer some suggestions. It may be as simple as calling cumsum to create a vector v, but I'm not certain.
0 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!