Info
この質問は閉じられています。 編集または回答するには再度開いてください。
simulering.m Line: 17 Column: 7 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
1 回表示 (過去 30 日間)
古いコメントを表示
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!