How to obtain the numerical integration of a set of different values of prameter which appear in Xmin

1 回表示 (過去 30 日間)
(k,x,y) is a generated integrand as the following codes. v is a parameter in TuuV. I want to get a set of value of the integration "M=arrayfun(@(D) integral3(@(k,x,y) TuuV(k,x,y,D),kc.*sqrt(mu+delta-v),ku,0,pi/2,0,pi/4,'reltol',1e-4),v);" with different values of v. And thus I set v=0:0.01:0.5 in the codes as following. However the codes show the error "Xmin must be floating point scalar". (If I set v=0.5 in the codes, the problem disappears) How to solve this problem? Many thanks!
The codes are as following:
clc
clear
close all
mu=11;
delta=10;
vh=16;
HBAR=1.05457266e-34;
ME=9.1093897e-31;
ELEC=1.60217733e-19;
kc=sqrt(2.*ME.*ELEC./HBAR.^2);
ku=kc.*sqrt(mu+delta);
v=0:0.01:0.5;
M=arrayfun(@(D) integral3(@(k,x,y) TuuV(k,x,y,D),kc.*sqrt(mu+delta-v),ku,0,pi/2,0,pi/4,'reltol',1e-4),v);
fid=fopen('D:\ceshi.txt','wt');
fprintf(fid,'%g\n',M);
fclose(fid);

採用された回答

Torsten
Torsten 2019 年 8 月 5 日
編集済み: Torsten 2019 年 8 月 5 日
M=arrayfun(@(D) integral3(@(k,x,y) TuuV(k,x,y,D),kc.*sqrt(mu+delta-D),ku,0,pi/2,0,pi/4,'reltol',1e-4),v);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePartial Differential Equation Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by