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 次查看(过去 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

采纳的回答

Red
Red 2019-6-13
i have solved the quesion i needed to fprint the answer in sientific notiation and it worked. :)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MuPAD 的更多信息

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by