I would like to create a for-loop for a vector T1 consisting of 21 elements where all are zero except the first, in order to get T2, which also has 21 elements, (temperature elements).
古いコメントを表示
This with the formula: Ti(t+0.28) = 0.5*(T(i+1)-2*Ti+T(i-1)). My code right now is:T1=zeros(21); T1(1)=22; T2=linspace(0,0.3,21); But I got no clue how to write the for-loop in this case. Greatful for help
4 件のコメント
sixwwwwww
2013 年 10 月 10 日
What is Ti(t+0.28) in your code? What does it mean in your scenario? Is Ti function of 't'? Also Is T2 a vector as you defined T2=linspace(0,0.3,21);
Gustaf
2013 年 10 月 10 日
sixwwwwww
2013 年 10 月 10 日
Dear still your question is not that clear can you please explain what is the relation between T1, T2, t, Ti?
Gustaf
2013 年 10 月 10 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!