Error: "First input argument must be a function handle." when taking an integral
Show older comments
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]
Accepted Answer
More Answers (0)
Categories
Find more on Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!