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).
Show older comments
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 Comments
sixwwwwww
on 10 Oct 2013
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
on 10 Oct 2013
sixwwwwww
on 10 Oct 2013
Dear still your question is not that clear can you please explain what is the relation between T1, T2, t, Ti?
Gustaf
on 10 Oct 2013
Accepted Answer
More Answers (0)
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!