Matlab: so berechnen Sie das bestimmte integral einer Funktion über mehrere Grenzen?

Übernehmen:

z = [0.4 0.5 0.75]'  
function y = myfunct(x)  
y = quad(@sin, 0, x)

Möchte ich berechnen das bestimmte integral von sin(x) von 0 bis 0.4, 0.5 und 0.75, Verwendung:

myfunct(z)

Doch Matlab gibt:

??? Error using ==> quad at 70  
The limits of integration must be scalars.  

Ich wäre dankbar für alle konstruktiven Vorschläge.

InformationsquelleAutor skip | 2011-10-16
Schreibe einen Kommentar