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.
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with MuPAD 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!