Tabulated Value for g
Mostrar comentarios más antiguos
t = [0 42];
initialcon = [0.637 0.0253 0.0249 0.0172 0.0491 0.241 4.84e-3 2.48e-4]; %should have 8
[t,y] = ode15s(@dSdT, t, initialcon, @dSdTplot); %function, time frame, initial condition
figure
plot(t, y)
title('Changing Concentration of Components Over Time')
xlabel('Time (h)')
ylabel('Concentration (g/L)')
legend({'Cellulose','Cellobiose', 'Glucose', 'Xylan', 'Xylobiose', 'Xylose', 'HMF', 'Furfural'},'Location','e')
grid
function [ f ] = dSdT(t,y)
c = y(1);
g2 = y(2);
g = y(3);
xn = y(4);
x2 = y(5);
x = y(6);
dCdt = -(r1) - (r2);
dG2dt = ((342.30/342.28)*(r1)) - (r3);
dGdt = ((180.16/162.14) * (r2)) + ((360.31/342.30) * (r3));
dXNdt = -(r4) - (r5);
dX2dt = ((282.24/264.22) * (r4)) - (r6);
dXdt = ((150.13/132.11) * (r5)) + ((300.226/282.24) * (r6));
dHdt = kh*g; %ADD MASS CHANGE
dFdt = kf*x; %ADD MASS CHANGE
f = [dCdt; dG2dt; dGdt; dXNdt; dX2dt; dXdt; dHdt; dFdt]; %dWdt
end
This is my code that I have set up for changing concetratons using ode15s. The file works absolutely fine (as I have no posted all the values of the file that are used to derive r1, r2 etc).
My question is how can I extract the data values of g (glucose)? I want to create a separate graph, preferentially on excel, where I can compare the concentration profile of glucose at different temperatures. I have taken the semi colon away from the g = y(3) term but all the values are posted as g= 0.5 g=0.45 g=0.4 etc so I cannot use this in excel. If someone could point me in the right direction for extracting this data I would be very grateful
Will
2 comentarios
Star Strider
el 30 de Mzo. de 2019
I can’t run your code.
When I attempted to, I got:
Undefined function or variable 'r1'.
This is not defined in ‘dSdT’ (or anywhere else that I can see), and not passed as an additional parameter in the ‘dSdT’ argument list.
Will Seccombe
el 30 de Mzo. de 2019
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!