MATLAB Answers

How to write Pearcey functions?

18 views (last 30 days)
xiang zhang
xiang zhang on 26 Oct 2020 at 14:33
Answered: Star Strider on 26 Oct 2020 at 14:48

  0 Comments

Sign in to comment.

Answers (2)

Ameer Hamza
Ameer Hamza on 26 Oct 2020 at 14:38
Edited: Ameer Hamza on 26 Oct 2020 at 14:39
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

  0 Comments

Sign in to comment.


Star Strider
Star Strider on 26 Oct 2020 at 14:48
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).

  0 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by