What is wrong with this line of script?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I've written: [t,h] = ode45('cylinder_tank_drain', [0, 200], h0)
it keeps coming up with an error message what just says there is an error in this line. what is wrong? :(
0 commentaires
Réponse acceptée
Plus de réponses (3)
Walter Roberson
le 5 Avr 2014
There is no obvious error in that line. Perhaps there is an error in the previous line that is affecting it. Please post more of your script.
Also, I suggest converting to function handle form:
[t, h] = ode45(@cylinder_tank_drain, [0, 200], h0);
0 commentaires
Youssef Khmou
le 5 Avr 2014
The problem resides in the function "cylinder_tank_drain", if it is possible you post the function to study its input and outputs.
0 commentaires
Alice
le 5 Avr 2014
Modifié(e) : Walter Roberson
le 5 Avr 2014
2 commentaires
Walter Roberson
le 5 Avr 2014
Your "r" is length 11. Your "r0" is length 10. You are trying to combine two vectors of different lengths.
Voir également
Catégories
En savoir plus sur Ordinary Differential Equations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!