How to write Pearcey functions?

54 次查看(过去 30 天)
xiang zhang
xiang zhang 2020-10-26
回答: Star Strider 2020-10-26

回答(2 个)

Ameer Hamza
Ameer Hamza 2020-10-26
编辑:Ameer Hamza 2020-10-26
You can use integral() function
Pe = @(x, y) integral(@(s) exp(1i*(s.^4 + s.*x + s.^2.*y)), -inf, inf); % first equation
Pe = @(x) integral(@(s) exp(1i*(s.^4 + s.^2.*x)), -inf, inf); % second equation

Star Strider
Star Strider 2020-10-26
I would code them as:
Pe1 = @(x) integral(@(s) exp(1i*(s.^4 + s.^2.*x)), -Inf, Inf, 'ArrayValued',1);
Pe2 = @(x,y) integral(@(s) exp(1i*(s.^4 + s.*x + s.^2.*y)), -Inf, Inf, 'ArrayValued',1);
These run without error (however not without Warnings, since I am not certain what the arguments should be, and those I tested it with threw Warnings).

类别

Help CenterFile Exchange 中查找有关 Installation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by