inner_intgrl_1 =
i am getting error when put definite integral of a ratio whose nemerator & denominator both are definte integral with variable limits.
Show older comments
syms x u
lmf = @(x) exp(-x.^2);
umf = @(x) exp(-(x-5).^2);
h = @(u) exp(-u.^2);
inner_intgrl_1 = int(u.*h,[lmf umf]);
inner_intgrl_2 = int(h,[lmf umf]);
inner_intgrl_3 = inner_intgrl_1./inner_intgrl_2;
outer_intgrl_1 = integral(x.*inner_intgrl_3,x,[0 10]);
outer_intgrl_2 = integral(inner_intgrl_3,x,[0 10]);
c_jb = outer_intgrl_1/outer_intgrl_2
Error using horzcat
Nonscalar arrays of function handles are not allowed; use cell arrays instead.
Error in JB_GT2 (line 15)
inner_intgrl_1 = int(u.*h,[lmf umf]);
Accepted Answer
More Answers (0)
Categories
Find more on Solver Outputs and Iterative Display 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!



