So I've got 3 tanks with 1000 litres of water in each and 3000 kg of salt in the two corner ones and 2000 kg of salt in the middle one. I want to plot how the salt concentration in each tank shifts if they all pump out 50 litres/minute to the next tank, i.e. A -> B -> C -> A -> B.... etc.

Sooooo this is my code here:

function C=salt(t,c)

C(1,1)=(3000-t*50*C(1,1)+t*50*C(3,1))/1000

C(2,1)=(2000+t*50*C(1,1)-t*50*C(2,1))/1000

C(3,1)=(3000+t*50*C(2,1)-t*50*C(3,1))/1000

and then in another function (or the same one? I'm really bad with this ode45 stuff)

[t,c]=ode45(@salt,[0,15],[3000,2000,3000])

plot(t,c(1,:),t,c(2,:),t,c(3,:))

Yeah I get a bunch of errors >_>. Any help is very much appreciated!

1. My I's are coming up i's. (lower case)

3. Almost Done! Need help formatting Excel

4. Array Looping: I am almost done, can someone please help me???

5. Please help! Almost done...

6. Merge Sort on linked list..my code is almost done..please help me on it

7. Merge Sort on linked list..my code is almost done..please help me on it

8. Doing weird stuff with DOS bootstraps

9. Merge Sort on linked list..my code is almost done..please help me on it

10. Formula Help... almost done with this project

11. Almost Done: Need some Help in Generating FEATURE VECTORS

12. Help on doing useful stuff in asm

13. Is this robots.txt file doing what I think it is doing?

14. ode45 problem - I am VERY new to mat lab - help!

1 post • Page:**1** of **1**