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).
Afficher commentaires plus anciens
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 commentaires
sixwwwwww
le 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
le 10 Oct 2013
sixwwwwww
le 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
le 10 Oct 2013
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Startup and Shutdown dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!