Using the MATLAB intergral function you can integrate a function between a min and max value. integral(fun,min,max)
But I was wondering how you can show the intergated equation in MATLAB?
For example, If i intergrate I would get . How can a display that in MATLAB.
Thanks

답변 (4개)

KSSV
KSSV 2021년 12월 4일

1 개 추천

syms x
f = 3*x-x^2 ;
iwant = int(f,x)
iwant = 
John D'Errico
John D'Errico 2021년 12월 4일

0 개 추천

Integral is a NUMERICAL tool for integration, uing adaptive numerical methods. It will return a NUMERICAL result, and only applies to definite integrals. Nothing more.
You need to use symbolic tools to perform an integration. That means you need to use syms.
syms x % creates x as a symbolic variable
int(x^2 + 2) % use int, NOT integral
ans = 
VBBV
VBBV 2021년 12월 4일

0 개 추천

syms x
f = 3*x-x^2 ;
F = int(f,x);
expand(F)
ans = 

카테고리

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

제품

릴리스

R2021b

질문:

2021년 12월 4일

답변:

2021년 12월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by