Plotting 2 functions with respect to each other
Información
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Mostrar comentarios más antiguos
I defined the following functions:
function alpha = error1(T)
syms x y
P0 = 1/(2*pi*0.6)*exp(-1/(2*0.36)*(x^2+y^2-2*0.8*x*y));
P1 = 1/(2*pi*1)*exp(-1/(2*1)*(x^2+y^2));
L1 = int(P1,x,-inf,0)/int(P0,x,-inf,0);
L2 = int(P1,x,0,+inf)/int(P0,x,0,+inf);
I1 = int(P0,x,-inf,0);
I2 = int(P0,x,0,+inf);
alpha = int(I1,y,L1>T)+ int(I2,y,L2>T);
end
function beta = error2(T)
syms x y
P0 = 1/(2*pi*0.6)*exp(-1/(2*0.36)*(x^2+y^2-2*0.8*x*y));
P1 = 1/(2*pi*1)*exp(-1/(2*1)*(x^2+y^2));
L1 = int(P1,x,-inf,0)/int(P0,x,-inf,0);
L2 = int(P1,x,0,+inf)/int(P0,x,0,+inf);
I1 = int(P1,x,-inf,0);
I2 = int(P1,x,0,+inf);
beta = int(I1,y,L1<T)+ int(I2,y,L2<T);
end
I don't if there's a problem in the expressions of alpha and beta, but what I mean is that Im trying to integrate I1 for example over the domain L1(y) < T.
After that I defined:
t = 0:0.01:30;
y1 = error1(t);
I get the following error:
Error using mupadmex
Error in MuPAD command: The argument is invalid. [Dom::Interval::new]
Error in sym/int (line 124)
rSym = mupadmex('symobj::intdef',f.s,x.s,a.s,b.s,options);
Error in error2 (line 10)
beta = int(I1,y,L1<T)+ int(I2,y,L2<T);
1 comentario
Walter Roberson
el 24 de Mayo de 2015
Respuestas (0)
La pregunta está cerrada.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!