simulering.m Line: 17 Column: 7 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
信息
此问题已关闭。 请重新打开它进行编辑或回答。
显示 更早的评论
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 个评论
回答(1 个)
Steven Lord
2019-12-2
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 个评论
此问题已关闭。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!