Last active
January 21, 2024 04:33
-
-
Save rezamarzban/9f2728ff123bf1bc5414455ea3e0d6c0 to your computer and use it in GitHub Desktop.
MATLAB function integral without symbolic pkg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Define the function to be integrated | |
fun = @(x) x.^2; | |
% Define the integration limits | |
lower_limit = 0; | |
upper_limit = 1; | |
% Calculate the definite integral | |
result = integral(fun, lower_limit, upper_limit); | |
disp(['Definite integral result: ', num2str(result)]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment