Error: "First input argument must be a function handle." when taking an integral
Afficher commentaires plus anciens
I am new to matlab and I am trying to figure out out to take an integral of the "fun" for every alue of "n". "First input argument must be a function handle." is the error that occurs.
Anything helps, thanks.
syms a b n
n = [0.60 0.62 0.64 0.66 0.68 0.70];
a=5.05;
b=2;
fun=@(w)(1./(a.*w.^n-b.*w));
for i=1:length(n)
t11(i)=integral(fun(i),0.5,10)
end
[SL: Formatted code as code not text]
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Programming dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!