how i can use a order that it's input is scalar but i want use from it for amounts of a vector
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
xosro
le 19 Mar 2016
Réponse apportée : Walter Roberson
le 20 Mar 2016
i want have a vector that members of it are amounts a numerical integral for a function at diffrent domains, that this domains are Initialized by a vector for integral order. as you know domain input for integral order is scalar hence when i use a domain vector i recive error. because i don't know size of the vector thus i can't use for loop.
for example :
f=@(x)(x); xmin=[-1 0]; xmax=[0 1]; [domain1 domain2]=integral(f,xmin,xamx)
0 commentaires
Réponse acceptée
Walter Roberson
le 20 Mar 2016
f=@(x)(x); xmin=[-1 0]; xmax=[0 1];
for K = 1 : length(xmin)
domain(K) = integral(f, xmin(K), xmax(K));
end
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Energy Production dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!