Need help with set of ode

Hello All, Attached are the set of ode which I am trying to code. Done with 1st two but not sure how to do the remaining. Your help is appreciated.

3 commentaires

Star Strider
Star Strider le 16 Sep 2016
It’s a system of differential equations, so you have to type them in. (We won’t write your code for you.)
When you’ve done that, and if you’re having problems with the integration, post what you’ve written and your ODE solver call (probably ode45 or ode15s). See the documentation for those solvers for help in coding your function file and your solver call.
James Tursa
James Tursa le 16 Sep 2016
Why is there a dx hanging off the end of the third equation?
adi kul
adi kul le 17 Sep 2016
@Star Strider I am not asking for the code. I have already solved 1s two. If you want to check these are:
function TempP=primary(Tp,y)
hp=13.64;
Tw=25;
mp=0.007;
Cp=1005;
TempP=-2*hp*(Tp-Tw)/(mp*Cp);
function water=Water(W,x)
Tw=25;
Wsat=0.0046*exp(0.0589*Tw);
ms=0.0023;
hm=0.013;
water=-hm*(Wsat-W)/ms;
And the script:
clear all
yrange=[0:0.02:0.9];
Tp=40;
[Tp,y]=ode45(@primary,yrange,Tp);
figure(1)
plot(Tp,y)
ylabel('Tp (deg C)')
xlabel ('Y (m)')
xrange=[0:0.025:0.49];
W=0.01168;
[W,x]=ode45(@Water,xrange,W);
figure(2)
plot(W,x)
ylabel('W')
xlabel ('X (m)')
What I am stuck with is the last two. I am not sure how I can code them.

Réponses (0)

Cette question est clôturée.

Tags

Question posée :

le 16 Sep 2016

Clôturé :

le 20 Août 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by