clc clear all close all global V S0 V=5; S0=50; x0=[0.2; 0.3; 0.1; 0.4]; w0=S0*x0; opcje=odeset('Events',@fstop); [t,w]=ode45(@fdestylacja,[0 10], w0, opcje); subplot(2,1,1) plot(t,w) xlabel('czas [s]') ylabel('ilosc moli składnika w wyparce [kmol]') legend('A','B','C','D') [lw,lk]=size(w) SK=sum(w(lw,:)) w01=w(lw,:)'+x0*25; [t1,w1]=ode45(@fdestylacja,[0 10], w0, opcje); subplot(2,1,2) plot(t1,w1) xlabel('czas [s]') ylabel('ilosc moli składnika w wyparce [kmol]') legend('A','B','C','D') figure plot(t,w,t1,w1)