Symbolic Toolbox Exponential Equations

Hi Everyone
Getting started with symbolic tool box and live editor.
Trying to enter the below Wiebe Function equation using symbolic toolbox so i can find the derivative and build up the governing equations for the system.
However, getting stuck on simply entering the equation with the syms function, doh, as the e term has (t/td) to the power m+1, can you help with how i actually code this in the live editor so i can use and later solve for dxWiebe Function Equation
Thanks everyone.;-)
My attempt at creating x
syms x exp t t_d m
t_d = sym('t_d')
x = 1 - exp(-6.908*(t/t_d))^(m+1)

답변 (1개)

Ameer Hamza
Ameer Hamza 2020년 4월 2일
편집: Ameer Hamza 2020년 4월 2일

0 개 추천

exp is a built-in function. Don't define it as a variable.
syms x t t_d m
x = 1 - exp(-6.908*(t/t_d)^(m+1));
dxdt = diff(x,t)
Result
dxdt =
(1727*exp(-(1727*(t/t_d)^(m + 1))/250)*(t/t_d)^m*(m + 1))/(250*t_d)
If you use live script, it will also render the equation to be displayed properly

댓글 수: 6

PB75
PB75 2020년 4월 2일
Thanks Ameer,
Great response.
When i enter the value of C which is -6.908 it does not fully simplify the equation in live editor, hence you have to divide through by 250 on num and dem, is this due to the decimal places on that constant? can this be simplified within syms?
Thanks again
Patrick
t_d =
x =
dxdt =
Ameer Hamza
Ameer Hamza 2020년 4월 2일
편집: Ameer Hamza 2020년 4월 2일
Is there a specific reason for simplifying it to that value?
PB75
PB75 2020년 4월 2일
Just trying to follow the derivation in the journal paper without questioning the code or equation in matlab
Try this to get fractional values
syms x t t_d m
x = 1 - exp(-6.908*(t/t_d)^(m+1));
dxdt = vpa(diff(x,t))
PB75
PB75 2020년 4월 6일
Thanks
Ameer Hamza
Ameer Hamza 2020년 4월 6일
Glad to be of help.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

제품

릴리스

R2020a

질문:

2020년 4월 2일

댓글:

2020년 4월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by