defining a function in script file
Afficher commentaires plus anciens
i want to code following kind of differential eqn in my script file
[t,y]=ode(@(t,y) [[qin-k{y^1.5- (y-b)^1.5}] /Area],t1span,h0)
where, b=f(t)=8.89e-5*t^3 - 4.57e-3*t^2 + 2.27e-1*t - 9.52e-3
area = f(y) = (1.6e-3*y^4 - 2.76e-2*y^3+ 1.4e-1*y^2 - 1.1e-1*y + 0.287)*1e6
when i substitute b and area in my DE, it gets very long and so messy. How can i pre-define b as f(t) and area as f(y) so that i can write my DE eqn in terms of b and area, not in the expanded terms of t and y
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Data Type Identification 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!