how to write an Algebraic Equation in Matlab

조회 수: 2 (최근 30일)
Arif Hoq
Arif Hoq 2021년 10월 15일
댓글: Star Strider 2021년 10월 15일
Hello,
there is an equation for solving Energy stored in a Capacitor. That's an easy equation. But, I want to write that solving equation in matlab. Would you please tell me how to solve that equation in matlab. Solving equation is given below:
Energy stored in a Capacitor = 0.5 * C * (Vfinal^2 - Vinitial^2)
= 0.5 * 31 * (320^2-310^2)
= 15.5 * (102400-96100)
= 15.5 * 6300
= 97650
Thank you very much.

채택된 답변

Star Strider
Star Strider 2021년 10월 15일
I am not certain exactly what you want.
See if this works —
C = 31
C = 31
Vinitial = 310
Vinitial = 310
Vfinal = 320
Vfinal = 320
Energy_stored_in_a_Capacitor = 0.5 * C * (Vfinal^2 - Vinitial^2)
Energy_stored_in_a_Capacitor = 97650
.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by