Error in untitled (line 3)

80 vues (au cours des 30 derniers jours)
Sergei Dementev
Sergei Dementev le 2 Nov 2021
[B, src] = eprload ('data.DTA');
plot(B, src + 0.1);
i = quad2d([B, src + 0.1], 3480, 3560 , -10, 10);
I need to integrate the function from the file twice. I don't quite get, why the code won't work...

Réponse acceptée

the cyclist
the cyclist le 2 Nov 2021
The first argument to quad2d needs to be a function handle.
I am not familiar with eprload, but its output looks like (x,y) data. I think you might need to use the trapz function instead of quad2d, to do a numerical integration.
  1 commentaire
Sergei Dementev
Sergei Dementev le 2 Nov 2021
Thank you :)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Numerical Integration and Differentiation dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by