description to solve equation involved integration
1 次查看(过去 30 天)
显示 更早的评论
Hi everyone, I have a question:
g(u) = inline('sqrt(2*pi*(delta)^2)*exp(-2*(pi^2)*(delta^2).*(u.^2))','u');
delta = [-1:0.001:1];
g(u) = 0.95;
integral g(u) with lower limit = -1/(2*x) and upper limit = 1/(2*x);
How can I express the integral(u) in Matlab to solve for x ;
Please help me
1 个评论
Rik
2022-2-15
Regarding your email ("Do you have an email?"):
Yes I do. If you have a question, post it on this forum. If you want to make sure I see your question, feel free to send me the link. Other than that I prefer to only be contacted about my File Exchange submissions.
采纳的回答
David Hill
2022-2-12
I am somewhat guessing this is what you want. Execution might take a few minutes. Reduce the delta array for faster execution.
syms x u
delta=-1:.001:1;
A=zeros(size(delta));
for k=1:length(delta)
g = sqrt(2*pi*(delta(k))^2)*exp(-2*(pi^2)*(delta(k)^2)*(u^2));
eqn=int(g,u,-1/(2*x),1/(2*x))==.95;
A(k)=vpasolve(eqn,x);
end
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!