フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

For loop help... :(

1 回表示 (過去 30 日間)
Walter Manns
Walter Manns 2011 年 11 月 11 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Regards,
I'm working on a big code, but i'm having trouble in this section:
for k=1:(t-1)
fo(k) = ((time(k+1)-time(k))/2)*(10^((Tpf(k+1)-Tr)/z)+10^((Tpf(k)-Tr)/z));
foo = sum(fo);
if foo<ff
tc = tp;
elseif foo>=ff
tc = ......;
end
end
Time, tpf are vectors. Tr, z, tp, ff are constants.
Imaging a heating problem, where tp is my process time. I want, when foo reach ff ammount, the time tc (wich would me the "start cooling" time) get the value of that time(k) iteration as a contant. Because it's in the loop, if i use tc = time(k) it will keep changing. I want when my foo reach ff, get the time(k) = constant, so afterwards in my code, that tc gives the initiation of my cooling process.
Thanks, i hope i explained it decent. Any questions please ask.

回答 (1 件)

Walter Manns
Walter Manns 2011 年 11 月 11 日
i just found how, no worries.

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by