Plotting and Calculating Integrals

조회 수: 1 (최근 30일)
Mark Windel Marquez
Mark Windel Marquez 2022년 6월 22일
댓글: Mark Windel Marquez 2022년 6월 25일
How will I plot and calculate these following integrals using matlab? What is the correct matlab code because it keeps me getting error :(( please help me~
  댓글 수: 1
Torsten
Torsten 2022년 6월 22일
편집: Torsten 2022년 6월 22일
What is the correct matlab code because it keeps me getting error :((
Then please show your code and the error message you receive.
And what do you mean by "plotting the integrals" ?

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

채택된 답변

chunyi liu
chunyi liu 2022년 6월 22일
syms x
int(2*x^2/sqrt(1+x),x,1,6)
int(cos(2*x)/x,x,1,2)
int(exp(2*x)/x,x,1,2)
int(exp(-x^2),x,-1,1)
Definite integrals are numerical values, not functions.
I'm not sure how you want to draw the plot, if give each value a corresponding independent variable and place them on the graph, you will see that they are four very similar values.
syms x
y1=int(2*x^2/sqrt(1+x),x,1,6)
y2=int(cos(2*x)/x,x,1,2)
y3=int(exp(2*x)/x,x,1,2)
y4=int(exp(-x^2),x,-1,1)
t=1:4;
y=[y1 y2 y3 y4];
plot(t,y1,'*')
axis([1 4 62.2692 62.2693])

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by