Question

In: Advanced Math

what is the code to solve and graph the following function in matlab dv/dt=80.5(1-e^(.4t))

what is the code to solve and graph the following function in matlab

dv/dt=80.5(1-e^(.4t))

Solutions

Expert Solution

>>syms v(t)                              %We just defined a symbolic function

>>ode = diff(v,t) == 80.5*(1-exp(4*t))    %we made the differential equation of v interms of t and

                                                                           stored it in ode

>>vSol=dsolve(ode)                           %we used dsolve to solve the equation ode and stored the

                                                                 function in vSol

Output

C1 + (161*t)/2 - (161*exp(4*t))/8

NOTE: we didnt give it any initial conditions so it put in a constant C1.

If you want to add an initial condition then add the following line before using dsolve

>>cond1 = v(0) == 'some number here'                   %cond1 is the name of the condition

then instead of last line use :

>>vSol = dsolve(ode,cond1)

Graphing

Here iam going to assume the constant C1 to be 0.

>> t=linspace(0,30,300);     %this basically gives t values from 0-30 divided into 300 equal parts

>> v=(161*t)/2 - (161*exp(4*t))/8;

>>plot(t,v);


Related Solutions

A. Show that the ideal gases following PV=nRT satisfy (dp/dv)(dv/dt)(dt/dp)=-1. B. Show that van see waals...
A. Show that the ideal gases following PV=nRT satisfy (dp/dv)(dv/dt)(dt/dp)=-1. B. Show that van see waals fluids following P=(RT/V-b) - a/V^2 satisfy (dp/dv)(dv/dt)(dt/dp)=-1. C. Use the fundamental relation, dH=TdS + VdP and Maxwell equations to show that (dH^ig/dV) = 0, which means that enthrall of ideal gases us independent of volume.
solve in MATLAB and screenshot code ?′′ −??′ +??= ???(????−?????)
solve in MATLAB and screenshot code ?′′ −??′ +??= ???(????−?????)
Using Matlab code, solve the following: (a) Consider first the undamped pendulum ? + sin ?...
Using Matlab code, solve the following: (a) Consider first the undamped pendulum ? + sin ? = 0, ?(0) = 0, ? (0) = b. Let x = ? and y = ? ; then x and y satisfy the system x = y y = ? sin x, x(0) = 0 y(0) = b. Solve this system numerically and plot, on a single graph, the resulting trajectories for the initial velocities b = 0.5, 1, 1.5, 2, 2.5. Use...
Solve using the same approach as the solution using Matlab for this differential equation d^2y/dt^2 +...
Solve using the same approach as the solution using Matlab for this differential equation d^2y/dt^2 + 6dy/dt + 9y = cos(t) has initial conditions y(0)=1 y'(0)=2, Find Y(s) and without finding y(t), determine what function of time will appear in the solution %} clear, clc syms Y s t real rhs = laplace(cos(t),t,s) eqn1 = s^2*Y - s*2 - 1 + 6*s*Y -1 + 9*Y ==rhs myanss = solve(eqn1,Y) mypart = partfrac(myanss,'FactorMode','real') %{ mypart = (0.08*s + 0.06)/(s^2 + 1.0)...
Hi, I need a Matlab code satisfies the following question. Output should be a graph similar...
Hi, I need a Matlab code satisfies the following question. Output should be a graph similar to a sine or cosine graph or similar to electrocardiograms (EKG/ECG) graph. Please I'd appreciate it. All love. Thanks :) In elementary quantum mechanics, the square well is used to model the behavior of a bound particle, in which one or more forces (external potentials, interaction with other particles, etc) prevent or restrict its ability to move about. We have seen in class that...
Write Matlab code that solves (dy/dt)= yt^3 - 1.5y on the interval t= 0 to 2...
Write Matlab code that solves (dy/dt)= yt^3 - 1.5y on the interval t= 0 to 2 where y(0) = 1. As well as (dy/dx) = (1+4x)y^.5 on the interval x = 0 to 1 where y(0) = 1 using Matlab functions that solve any ODE using the below methods Midpoint Method Huens Method Functions need to call: Error desired number of iterations Step size Initial Interval y(0) And return Result Error of that result
Write Matlab code that solves (dy/dt)= yt^3 - 1.5y on the interval t= 0 to 2...
Write Matlab code that solves (dy/dt)= yt^3 - 1.5y on the interval t= 0 to 2 where y(0) = 1. As well as (dy/dx) = (1+4x)y^.5 on the interval x = 0 to 1 where y(0) = 1 using Matlab functions that solve any ODE using the below method Runge-Kutta Method 4th Order Functions need to call: Error desired number of iterations Step size Initial Interval y(0) And return Result Error of that result
MATLAB CODE: Making cubic spline iterpolation function. Then, To solve use Tridiagonal matrix algorithm(TDMA) xi -0.5...
MATLAB CODE: Making cubic spline iterpolation function. Then, To solve use Tridiagonal matrix algorithm(TDMA) xi -0.5 -0.4 -0.2 0 0.2 0.4 0.6 0.8 yi 0.04 0.1 0.4 1 0.35 0.2 0.3 0.04
Please solve the following problem for MATLAB Write a user-defined function that calculates the average and...
Please solve the following problem for MATLAB Write a user-defined function that calculates the average and the standard deviation of a list of numbers. Use the function to calculate the average and the standard deviation of the following list of grades : 80 75 91 60 79 89 65 80 95 50 81
Solve using matlab code!! Use the graphical method to solve 4x1 − 8x2 = −24 x1...
Solve using matlab code!! Use the graphical method to solve 4x1 − 8x2 = −24 x1 + 6x2 = 34 Check your results by substituting them back into the equations.(include this on the code)
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT