where is the error in my code?

1 回表示 (過去 30 日間)
Abdallah Qaswal
Abdallah Qaswal 2022 年 6 月 19 日
コメント済み: Abdallah Qaswal 2022 年 6 月 20 日
Hi every one,
when I run the following code, I get a plot with unexpected two lines as circled by the red lines in the image attached! where is the error because we do not expect these lines to appear according to the physical equations?
V1 = @(r,w) -acosh(10*(w/(1600*r + 21))^(1/2))/20000000000
V2 = @(r,w) acosh(10*(w/(1600*r + 21))^(1/2))/20000000000
% Define function to be integrated
fun = @(x,r,w)0.0018./((w./((cosh(10^10.*x./0.5)).^2)-(r.*16+0.21)).^(1/2));
www = @(w,r)5.124-6.4*10^-6.*(exp(-215.6*0.5*(w.^(1/2)-(r.*16+0.21).^(1/2))).*log10((exp(-215.6*0.5*(w.^(1/2)-(r.*16+0.21).^(1/2)))))./(r.*(integral(@(x)fun(x,r,w),V1(r,w),V2(r,w)))))-(exp(-37.45.*r).*(70.31));
fimplicit(www,[0 5 0 0.075],'MeshDensity',500, 'LineWidth',1.5),grid
  15 件のコメント
Abdallah Qaswal
Abdallah Qaswal 2022 年 6 月 20 日
Unfortunately, this also did NOT work, any other alternatives?
Abdallah Qaswal
Abdallah Qaswal 2022 年 6 月 20 日
I even put log 10 = 2.3, but still no desired results, here is the last modified code :
V1 = @(r,w) -acosh(10*(w/(1600*r + 21))^(1/2))/20000000000
V2 = @(r,w) acosh(10*(w/(1600*r + 21))^(1/2))/20000000000
% Define function to be integrated
fun = @(x,r,w)2.3*r.*0.0018./((w./((cosh(10^10.*x./0.5)).^2)-(r.*16+0.21)).^(1/2));
www = @(w,r)5.124+6.4*10^-6.*215.6*0.5*(w.^(1/2)-(r.*16+0.21).^(1/2)).*exp(-215.6*0.5*(w.^(1/2)-(r.*16+0.21).^(1/2)))./(integral(@(x)fun(x,r,w),V1(r,w),V2(r,w)))-(exp(-37.45.*r).*(70.31));
fimplicit(www,[0 5 0.001 0.075],'MeshDensity',500, 'LineWidth',1.5),grid

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by