Undefined function or Variable error

1 vue (au cours des 30 derniers jours)
Dan
Dan le 30 Avr 2023
Commenté : Dan le 30 Avr 2023
Hi,
I create a function to use the Mid-point formula to calculate the integral value, but it keeps showing undefined error. I wonder where is the problem, and how I can fix it? Thanks!

Réponses (1)

Walter Roberson
Walter Roberson le 30 Avr 2023
x = a:h:b;
However, any current version of MATLAB may have problems with you replacing the function handle f with the result of invoking the function handle. Use different variable names for the function handle and the result of evaluation.
  1 commentaire
Dan
Dan le 30 Avr 2023
I got it! Thank you so much!

Connectez-vous pour commenter.

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Produits


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by