I want to input this as a function of x in matlab because I need to plot it
how do I input this definite integral inside the function?

 Réponse acceptée

Jan
Jan le 28 Mai 2022
Modifié(e) : Jan le 28 Mai 2022
% As anonymous function:
f = @(x) integral(@(t) 2 * sqrt(0.0625 - t.^2), -0.25, x - 0.25) / 0.0981747704247;
f(13)
ans = 1.9999e+00 + 1.6526e+03i
% As function:
g(13)
ans = 1.9999e+00 + 1.6526e+03i
function y = g(x)
y = integral(@(t) 2 * sqrt(0.0625 - t.^2), -0.25, x - 0.25) / 0.0981747704247;
end

Plus de réponses (0)

Catégories

En savoir plus sur Function Creation dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by