Integrating 2 symbolic functions w.r.t. a single variable

1 回表示 (過去 30 日間)
Shan  Chu
Shan Chu 2017 年 2 月 14 日
コメント済み: Steven Lord 2017 年 2 月 14 日
Hi, I would like to know if there is a way to integrate a multiplication of 2 symbolic functions with respect to a single variable. For example:
mu_0 = 4.*pi.*1e-7;
ep_0 = 8.854e-12;
mu_r = 1;
ep_r = 1;
mu=mu_0*mu_r;
ep=ep_0*ep_r;
f = 0.159e9;
omega = 2.*pi.*f;
sig1=0;
sig3=10;
gamma0=@(x) sqrt(x.^2-omega^2*mu*ep+1i*omega*mu*sig1);
gamma3=@(x) sqrt(x.^2-omega^2*mu*ep+1i*omega*mu*sig3);
F_A_Z=@(x) gamma0*gamma3;
A_Z=mu*integral(F_A_Z,0,Inf,'RelTol',1e-6,'AbsTol',1e-12,'ArrayValued',true);
Then Matlab said Undefined operator '*' for input arguments of type 'function_handle'. Could you pleas help?
Thanks

採用された回答

Torsten
Torsten 2017 年 2 月 14 日
F_A_Z=@(x) gamma0(x).*gamma3(x);
Best wishes
Torsten.
  1 件のコメント
Steven Lord
Steven Lord 2017 年 2 月 14 日
You can't multiply function handles.
You can multiply the results of evaluating function handles.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by