Solving a pair of equation using matlab
조회 수: 2 (최근 30일)
이전 댓글 표시
how to solve the following pair of equation using MATLAB
y(t) = k*exp(-t/2)*cos(theta + (3^(1/2)*t)/2)
y(t = 0) = 0
Dy(t = 0) = 1
Solve for "k" and "theta"
Dy(t) mean differenttiation of function y(t) w.r.t t
Also return y(t) with values of k and theta inserted
댓글 수: 0
답변 (1개)
Bjorn Gustavsson
2021년 10월 5일
You have 2 unknown parameters k and theta. You have one condition for y at t=0 and one condition for dy/dt at t=0. Since you have an explicit expression for y(t) you can differentiate that to give you an explicit expression for dy/dt. That will result in 2 expressions for y and dy/dt. This should make it possible to determine the 2 parameters. Simply start by manually differentiating y(t) unsing the product rule.
HTH
댓글 수: 7
Bjorn Gustavsson
2021년 10월 5일
Then the question becomes more of "how to parse user input and interpret that" - once that is solved it should be comparatively easy to build a sum of derivatives of a polynomial or a differential equation. I suggest you open a new question on that.
참고 항목
카테고리
Help Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!