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
댓글 수: 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!