Hi I am new to matlab and i would like to know how to plot the function
for x in the intervall (0,50). Does someone have an idea?

 채택된 답변

Torsten
Torsten 2022년 3월 23일

0 개 추천

a=1;
fun = @(z,x) z.^a./sinh(z).*1./(x.^2+z.^2);
X = 0:0.1:50;
for i = 1:numel(X)
x = X(i);
F(i) = x*sin(x)*integral(@(z)fun(z,x),0,Inf)
end
plot(X,F)

댓글 수: 2

David Astner
David Astner 2022년 3월 23일
Hi. thank you i always get the error message: Execution of script integral as a function is not supported
Torsten
Torsten 2022년 3월 23일
Rename the script in test.m.
integral.m is a MATLAB function - the name is reserved.

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

추가 답변 (0개)

카테고리

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

태그

질문:

2022년 3월 23일

댓글:

2022년 3월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by