how to find T(i+1) when we have series of data .
조회 수: 2 (최근 30일)
이전 댓글 표시
Engineer Batoor khan mummand
2020년 10월 10일
편집: Engineer Batoor khan mummand
2020년 10월 14일
Hi all;
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/376381/image.png)
how to find T(i+1) for each day of s values.
i can import data but i have problem in loop i mean to find values of T(i+1) for each values of S?
thanks in advance from all of u,
댓글 수: 0
채택된 답변
KSSV
2020년 10월 10일
From your formula you can write the following for T(i+1)
T(i+1) = k*S*(Tb-T(i))+T(i) ;
Define your k, S, Tb and intialize your T with intiial value and run a loop.
k = rand ; % give your value
S = rand ; % give your value
n = 100 ;
T = zeros(n,1) ;
T(1) = 3. ; % initial value of T
for i = 2:n
T(i) = k*S*(Tb-T(i-1))+T(i-1) ;
end
댓글 수: 11
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Solar Power에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!