k_n= 7*10^-11;n= 2;i=1;t(i)=0; %in hours
a = sym('a')while t<=2.5 %2.5hours
a= 1-exp(-k_n*(t(i))^n); %degree of hydration
dt=1/3600; %1sec interval
t(i+1)=t(i)+dt; i=i+1; endfigure(1);plot(t,a,'r'),xlabel('t [h]'),ylabel('degree of hydration');hold on;
MATLAB: Can’t i plot a graph for a against t
plottingsymbolicwhile loop
Related Question
- How to solve ODEs with time dependent parameters by RK4 method
- SYNTAX MATLAB
- Need solution for this – error message “In an assignment A(:) = B, the number of elements in A and B must be the same.”
- I’m trying to create a script file that determines the trajctory of a baseball thrown with an initial velocity of 20 m/s, there’s no air resistence.
- Using subplot with ode45
- Fourier Coefficient Plots with variable n or m
Best Answer