Nested function global variable
Show older comments
function T = fun(theta)
global m
m = theta^2;
T = quad(@fun2,0,1)
end
function out = fun2(t)
out=( (1-m*t^2)*(1-t^2) );
end
I have the two functions above. When I call for fun, it does not seem to be working. I am new to Matlab so it would be greatly appreciated if someone could help my understanding. Thanks
Accepted Answer
More Answers (1)
Julia
on 15 Oct 2015
0 votes
Categories
Find more on Mathematics 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!