Hi all,(adsbygoogle = window.adsbygoogle || []).push({});

I'm a newbie at MATLAB and currently trying to model a chromatographic process, I have a PDE to be solved in the form of c*D(C_RH)/Dz = D(f)/Dz + s (see code below for what functions c, f and s are made of)

I have defined constant values for each of the individual parameters which make up functions c, f and s with the exception of the parameter C_RH which has yet to be solved.

Also z= linspace(0, 1, 5)

t = linspace(0, 1, 20)

Now I have the following matlab code for solving the PDE:

Note: d(C_RH)dz in matlab code is supposed to represent D(C_RH)/DzCode (Matlab M):

[c,f,s] = pdefun(z,t,C_RH,dC_RHdz)

[c,f,s] = pdex1pde(z,t,C_RH,dC_RHdz)

c = epsilon_t*C_H_cation+epsilon_e*K_a_sucrose;

f = (D_L_sucrose)*epsilon_e*((C_H_cation)+(K_a_sucrose))*d(C_RH)dz;

s = -u*((C_H_cation)+(K_a_sucrose))*d(C_RH)dz;

this is the way PDE terms were written in a matlab example script for solving PDEs.

I am getting a errors saying that the value assigned to c, f and s appears to be unused. Also errors saying 'Parse error at dz: usage might be invalid MATLAB syntax'.

Can anybody me help please?

Regards

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Solving PDE in Matlab

Loading...

Similar Threads - Solving Matlab | Date |
---|---|

Matlab Solving equation with integration using MATLAB | Aug 4, 2017 |

Solve Riccati (DARE) with MATLAB | Sep 14, 2016 |

Too little appearance of symbols and numbers in matlab [Solved] | Jun 10, 2016 |

How can i solve these equations in Matlab? | May 17, 2015 |

[MATLAB] I am getting this error, could anyone solve it please? | Dec 8, 2014 |

**Physics Forums - The Fusion of Science and Community**