hello,
can I integrate over a symfun ?
the following doesn't work:
---
syms f(x)
f(x)=x+2 %just a simple example
ans=integral(f,1,2) % for integrating over f(x) between x=[1,2]
---
any ideas ? thanks !

답변 (1개)

Philipp
Philipp 2017년 5월 20일

1 개 추천

Using matlabFunction(f) works:
syms f(x)
f(x) = x+2
ans = integral(matlabFunction(f),1,2)

카테고리

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

질문:

2013년 11월 22일

답변:

2017년 5월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by