フィルターのクリア

Multiple integrals with 2 definite integral and 2 symbolic result, how can I get it?

8 ビュー (過去 30 日間)
I want to do a multiple integrals with 4 variable (a, b, x, y), but just a and b need to do definite integral with numeric, x and y still the symbolic result, how can I get it?
This is my code that I fixed it many times, so it might be illogical.
syms a b x y;
fun1= @(a,b,x,y) ...
exp(-1i.*2.*pi.*(a.*(x-x0)+b.*(y-y0))); % while x0, y0 is known numbers.
f1=int(fun1,-2,2,a);
f1=int(f1,-2,2,b);
I also tried integral2 function.
f1=integral2(fun1,-2,2,-2,2);
I'm wondering that should I use int? integral2? or other function to match my propose.
This is the result I want:
f1=(...x)+(...y)
And if syms and function handle have same function will blow up "Input function must return 'double' or 'single' values. Found 'sym'." ?

採用された回答

Dyuman Joshi
Dyuman Joshi 2023 年 4 月 26 日
編集済み: Dyuman Joshi 2023 年 4 月 26 日
The sytanx you used was incorrect, the correct syntax is - int(Integrand, Integration Variable, Limits of Integration)
syms a b x y x0 y0
fun1= @(a,b,x,y) exp(-1i.*2.*pi.*(a.*(x-x0)+b.*(y-y0))); % while x0, y0 are* known numbers.
f1=int(fun1,a,-2,2);
f1=int(f1,b,-2,2)
f1 = 
%Then integrate w.r.t to x and y
f1=int(f1,x)
f1 = 
f1=int(f1,y)
f1 = 

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by