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).
Mostrar comentarios más antiguos
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 comentarios
sixwwwwww
el 10 de Oct. de 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
el 10 de Oct. de 2013
sixwwwwww
el 10 de Oct. de 2013
Dear still your question is not that clear can you please explain what is the relation between T1, T2, t, Ti?
Gustaf
el 10 de Oct. de 2013
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!