Azzera filtri
Azzera filtri

description to solve equation involved integration

1 visualizzazione (ultimi 30 giorni)
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 Commento
Rik
Rik il 15 Feb 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.

Accedi per commentare.

Risposta accettata

David Hill
David Hill il 12 Feb 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

Più risposte (0)

Categorie

Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by