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

I am trying to write a short matlab program that plots concentration vs distance (oxygen sag curve from two different bod sources in a river). I know the equation im using is:

C= Cs - [(kd*Mo)*(exp(-x*kr/u)-exp(-x*ka/u))/(Q*ka-kr)] - (Cs-Co)*exp(-x*ka/u) - [(kd*Mo)*(exp(-(x-L)*kr/u)-exp(-(x-L)*ka/u))/(Q*ka-kr)].

Its very long and im having trouble getting it to work in matlab form.

Can someone used to matlab give me some hints how to make this work?

I know how to execute a plot by plot(x,C) but the equation is giving me trouble.

Any help would be greatly appreciated.

Thanks.

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

Join Physics Forums Today!

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

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

# Basic matlab help with plotting

Loading...

Similar Threads - Basic matlab help | Date |
---|---|

Issues with basic Matlab command | Sep 27, 2014 |

Matlab basic - how to get around floating point? | Aug 30, 2014 |

Matlab - basic script | Nov 6, 2013 |

Need some help with basics of MATLAB | May 18, 2009 |

New to MATLAB, Need basic help | Oct 30, 2007 |

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