필터 지우기
필터 지우기

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