description to solve equation involved integration

1 visualización (últimos 30 días)
Tu Nguyen
Tu Nguyen el 12 de Feb. de 2022
Comentada: Rik el 15 de Feb. de 2022
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 comentario
Rik
Rik el 15 de Feb. de 2022
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.

Iniciar sesión para comentar.

Respuesta aceptada

David Hill
David Hill el 12 de Feb. de 2022
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

Más respuestas (0)

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by