I am trying to get matlab to solve the derivative for t which should come out to 693.15 u. it displays the p value correctly.
2 views (last 30 days)
Show older comments
code:
vnum=input('Enter any numbers before expnential value of V: ');
vcoeff=input('Enter the coeficent to the exponential (V): ');
vexp=input('Enter the exponent to the exponential (V): ');
icoeff=input('Enter the coeficent to the exponential (I): ');
iexp=input('Enter the exponent to the exponential (I): ');
pnum=vnum*icoeff;
pcoeff=vcoeff*icoeff;
pexp=iexp+vexp;
fprintf('p= %0.2fe^( ',pnum)
fprintf('%0.2ft) ',iexp)
fprintf('%0.2fe^(',pcoeff)
fprintf('%0.2ft) W\n',pexp)
fprintf('\n')
syms t;
equation1=(pnum*exp(iexp*t))-pcoeff*exp(pexp*t);
diffequation1=diff(equation1);
pretty(solve(diffequation1,t))
---------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------
display:
Enter 1 for part A:
Enter 2 for part B:
1
Enter any numbers before expnential value of V: 75
Enter the coeficent to the exponential (V): -75
Enter the exponent to the exponential (V): -1000
Enter the coeficent to the exponential (I): .05
Enter the exponent to the exponential (I): -1000
p= 3.75e^( -1000.00t) -3.75e^(-2000.00t) W
pi 1i log(2)
----- + ------
1000 1000
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Get Started with MuPAD in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!