Facebook
From Eratic Hornbill, 4 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 204
  1. clc
  2. clear all
  3. close all
  4. global V S0
  5. V=5;
  6. S0=50;
  7. x0=[0.2; 0.3; 0.1; 0.4];
  8. w0=S0*x0;
  9. opcje=odeset('Events',@fstop);
  10. [t,w]=ode45(@fdestylacja,[0 10], w0, opcje);
  11. subplot(2,1,1)
  12. plot(t,w)
  13. xlabel('czas [s]')
  14. ylabel('ilosc moli składnika w wyparce [kmol]')
  15. legend('A','B','C','D')
  16. [lw,lk]=size(w)
  17. SK=sum(w(lw,:))
  18. w01=w(lw,:)'+x0*25;
  19. [t1,w1]=ode45(@fdestylacja,[0 10], w0, opcje);
  20. subplot(2,1,2)
  21. plot(t1,w1)
  22. xlabel('czas [s]')
  23. ylabel('ilosc moli składnika w wyparce [kmol]')
  24. legend('A','B','C','D')
  25. figure
  26. plot(t,w,t1,w1)