필터 지우기
필터 지우기

Is it wrong with my equation for energy? Cause my manual calculation not same with this.

조회 수: 1 (최근 30일)
syms t; V=(1/c)*int(exp(t)*sin(3*t)); c=0.003; Energy = (1/2)*c.*V.^2;
Unrecognized function or variable 'c'.
figure(3); fplot(Energy,[0 6]); grid; xlabel('time'); ylabel('Energy'); title('Energy vs time');
  댓글 수: 1
Walter Roberson
Walter Roberson 2023년 8월 31일
syms t c;
V = (1/c)*int(exp(t)*sin(3*t));
Energy = (1/2)*c.*V.^2
Energy = 
C = 0.003;
Energy = subs(Energy, c, C)
Energy = 
figure(3);
fplot(Energy,[0 6]);
grid;
xlabel('time');
ylabel('Energy');
title('Energy vs time');

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

답변 (1개)

Sivapriya Srinivasan
Sivapriya Srinivasan 2023년 8월 31일
Hello,
The equation you provided for calculating energy seems to be correct. However, it's important to note that the integration limits and the value of c might affect the result.
The equation calculates the energy at different time points using the given expression for V and the value of c. It then plots the energy as a function of time.
If you are getting different results from your manual calculation, it's possible that there might be an error in your manual calculation or a discrepancy in the integration limits or value of c you are using.
To confirm if the equation is correct, you can try evaluating V and Energy at specific time points and compare the results with your manual calculations. For example, you can substitute specific values of t into V and Energy and compare them.
To help you further, please provide the details of your manual calculation and the expected result. Additionally, if you have any specific error messages or unexpected outputs, please share them as well. This information will assist in identifying the potential problem and providing a more accurate solution

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by