Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9153641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:18:21+00:00 2026-06-17T12:18:21+00:00

starting from this code: clc, clear all, close all tic k1 = 0.01:0.1:100; k2

  • 0

starting from this code:

    clc, clear all, close all
tic

k1 = 0.01:0.1:100;
k2 = 0.01:0.1:100;
k3 = 0.01:0.1:100;

k = sqrt(k1.^2 + k2.^2 + k3.^2);

c = 1.476;
gamma = 3.9;

colors = {'cyan'};
Ek = (1.453*k.^4)./((1 + k.^2).^(17/6));
E = @(k) (1.453*k.^4)./((1 + k.^2).^(17/6));
E_int = zeros(1,numel(k1));
E_int(1) = 1.5;

for i = 2:numel(k)
    E_int(i) = E_int(i-1) - integral(E,k(i-1),k(i));
end

beta = c*gamma./(k.*sqrt(E_int));


F_11 = zeros(1,numel(k1));
F_22 = zeros(1,numel(k1));
F_33 = zeros(1,numel(k1));

count = 0;
for i = 1:numel(k1)
    count = count + 1;
    phi_11 = @(k2,k3) phi_11_new(k1,k2,k3,beta,i);
    phi_22 = @(k2,k3) phi_22_new(k1,k2,k3,beta,i);
    phi_33 = @(k2,k3) phi_33_new(k1,k2,k3,beta,i);
    F_11(count) = integral2(phi_11,-100,100,-100,100);
    F_22(count) = integral2(phi_22,-100,100,-100,100);
    F_33(count) = integral2(phi_33,-100,100,-100,100);
end

figure
hold on
plot(k1,F_11,'b')
plot(k1,F_22,'cyan')
plot(k1,F_33,'magenta')
hold off

where

function phi_11 = phi_11_new(k1,k2,k3,beta,i)
k = sqrt(k1(i).^2 + k2.^2 + k3.^2);
k30 = k3 + beta(i).*k1(i);
k0 = sqrt(k1(i).^2 + k2.^2 + k30.^2);
E_k0 = 1.453.*k0.^4./((1 + k0.^2).^(17/6));
C1 = (beta(i).*k1(i).^2).*(k1(i).^2 + k2.^2 - k3.*k30)./(k.^2.*(k1(i).^2 + k2.^2));
C2 = k2.*k0.^2./((k1(i).^2 + k2.^2).^(3/2)).*atan2((beta(i).*k1(i).*sqrt(k1(i).^2 + k2.^2)),(k0.^2 - k30.*k1(i).*beta(i)));
xhsi1 = C1 - k2./k1(i).*C2;
xhsi1_q = xhsi1.^2;
phi_11 = E_k0./(4.*pi.*k0.^4).*(k0.^2 - k1(i).^2 - 2.*k1(i).*k30.*xhsi1 + (k1(i).^2 + k2.^2).*xhsi1_q);
end

function phi_22 = phi_22_new(k1,k2,k3,beta,i)
k = sqrt(k1(i).^2 + k2.^2 + k3.^2);
k30 = k3 + beta(i).*k1(i);
k0 = sqrt(k1(i).^2 + k2.^2 + k30.^2);
E_k0 = 1.453.*k0.^4./((1 + k0.^2).^(17/6));
C1 = (beta(i).*k1(i).^2).*(k1(i).^2 + k2.^2 - k3.*k30)./(k.^2.*(k1(i).^2 + k2.^2));
C2 = k2.*k0.^2./((k1(i).^2 + k2.^2).^(3/2)).*atan2((beta(i).*k1(i).*sqrt(k1(i).^2 + k2.^2)),(k0.^2 - k30.*k1(i).*beta(i)));
xhsi2 = k2./k1(i).*C1 + C2;
xhsi2_q = xhsi2.^2;
phi_22 = E_k0./(4.*pi.*k0.^4).*(k0.^2 - k2.^2 - 2.*k2.*k30.*xhsi2 + (k1(i).^2 + k2.^2).*xhsi2_q);
end

function phi_33 = phi_33_new(k1,k2,k3,beta,i)
k = sqrt(k1(i).^2+k2.^2+k3.^2);
k30 = k3 + beta(i).*k1(i);
k0 = sqrt(k1(i).^2+k2.^2+k30.^2);
E_k0 = (1.453.*k0.^4./((1+k0.^2).^(17/6)));
phi_33 = (E_k0./(4*pi.*(k.^4))).*(k1(i).^2+k2.^2);
end

This procedure is leading me to results not matching some others coming from a study. The results I should match are posted below:

enter image description here

whereas mine look like these

enter image description here

It’s quite easy to esteem how only the comp w match the theoretical results; therefore, I believe that the flaw may reside in the definition of beta outside the function phi_11_new (and phi_22_new).

May any of you suggest how to calculate beta within phi_11_new(and phi_22_new) instead than the way I currently do?

I thank you all in advance for supporting.

Best Regards,
fpe

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T12:18:21+00:00Added an answer on June 17, 2026 at 12:18 pm

    I have improved the interpolation so that it no longer breaks down for small values. It also returns more correct values since it now interpolates the logarithms of the values.

    Here is the code, as it is now.

    function test15()
    
    [k1,k2,k3] = deal(0.01:0.1:400);
    
    k = sqrt(k1.^2 + k2.^2 + k3.^2);
    
    c = 1.476;
    gamma = 3.9;
    
    Ek = (1.453*k.^4)./((1 + k.^2).^(17/6));
    E_int = 1.5-cumtrapz(k,Ek);
    beta = c*gamma./(k.*sqrt(E_int));
    
    [F_11,F_22,F_33] = deal(zeros(1,numel(k1)));
    
    k_vec = k;
    beta_vec = beta;
    
    kLim = 100;
    
    for ii = 1:numel(k1)
        phi_11 = @(k2,k3) phi_11_new(k1(ii),k2,k3,k_vec,beta_vec);
        phi_22 = @(k2,k3) phi_22_new(k1(ii),k2,k3,k_vec,beta_vec);
        phi_33 = @(k2,k3) phi_33_new(k1(ii),k2,k3,k_vec,beta_vec);
        F_11(ii) = quad2d(phi_11,-kLim,kLim,-kLim,kLim);
        F_22(ii) = quad2d(phi_22,-kLim,kLim,-kLim,kLim);
        F_33(ii) = quad2d(phi_33,-kLim,kLim,-kLim,kLim);
    end
    
    figure
    loglog(k1,F_11,'b')
    hold on
    loglog(k1,F_22,'cyan')
    loglog(k1,F_33,'magenta')
    hold off
    grid on
    
    end
    
    function phi_11 = phi_11_new(k1,k2,k3,k_vec,beta_vec)
    k = sqrt(k1^2 + k2.^2 + k3.^2);
    
    log_beta_vec = interp1(log(k_vec),log(beta_vec),log(k(:)),'linear','extrap');
    log_beta = reshape(log_beta_vec,size(k));
    beta = exp(log_beta);
    
    k30 = k3 + beta*k1;
    k0 = sqrt(k1^2 + k2.^2 + k30.^2);
    E_k0 = 1.453*k0.^4./((1 + k0.^2).^(17/6));
    C1 = (beta*k1^2).*(k1^2 + k2.^2 - k3.*k30)./(k.^2.*(k1^2 + k2.^2));
    C2 = k2.*k0.^2./((k1^2 + k2.^2).^(3/2)).*atan2((beta*k1.*sqrt(k1^2 + k2.^2)),(k0.^2 - k30*k1.*beta));
    xhsi1 = C1 - (k2/k1).*C2;
    xhsi1_q = xhsi1.^2;
    phi_11 = E_k0./(4.*pi.*k0.^4).*(k0.^2 - k1^2 - 2*k1*k30.*xhsi1 + (k1^2 + k2.^2).*xhsi1_q);
    end
    
    function phi_22 = phi_22_new(k1,k2,k3,k_vec,beta_vec)
    k = sqrt(k1^2 + k2.^2 + k3.^2);
    
    log_beta_vec = interp1(log(k_vec),log(beta_vec),log(k(:)),'linear','extrap');
    log_beta = reshape(log_beta_vec,size(k));
    beta = exp(log_beta);
    
    k30 = k3 + beta*k1;
    k0 = sqrt(k1^2 + k2.^2 + k30.^2);
    E_k0 = 1.453*k0.^4./((1 + k0.^2).^(17/6));
    C1 = (beta*k1^2).*(k1^2 + k2.^2 - k3.*k30)./(k.^2.*(k1^2 + k2.^2));
    C2 = k2.*k0.^2./((k1^2 + k2.^2).^(3/2)).*atan2((beta*k1.*sqrt(k1^2 + k2.^2)),(k0.^2 - k30.*k1.*beta));
    xhsi2 = (k2/k1).*C1 + C2;
    xhsi2_q = xhsi2.^2;
    phi_22 = E_k0./(4.*pi.*k0.^4).*(k0.^2 - k2.^2 - 2.*k2.*k30.*xhsi2 + (k1^2 + k2.^2).*xhsi2_q);
    end
    
    function phi_33 = phi_33_new(k1,k2,k3,k_vec,beta_vec)
    k = sqrt(k1^2+k2.^2+k3.^2);
    
    log_beta_vec = interp1(log(k_vec),log(beta_vec),log(k(:)),'linear','extrap');
    log_beta = reshape(log_beta_vec,size(k));
    beta = exp(log_beta);
    
    k30 = k3 + beta*k1;
    k0 = sqrt(k1^2+k2.^2+k30.^2);
    E_k0 = (1.453*k0.^4./((1+k0.^2).^(17/6)));
    phi_33 = (E_k0./(4*pi*(k.^4))).*(k1^2+k2.^2);
    end
    

    The figure seems to agree with the original result quite well. Even if there still are some differences.

    Side note: Since a k-value of 100 is set as an upper limit in the simulation the values greater than this in the figure are incorrect. They are calculated without using all values in the full (k2,k3)-“circle”. We can also see a deviation for these values.

    New loglog-plot of F11, F_22 and F_33.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Starting from this official statement that all xyAndroid versions previous API 11 doesn't support
I have this code which orders the numbers starting from the biggest one but
Starting from this code: class Base{ public: virtual void foo(){....} }; class Derived{ public:
Starting from Android 3.2 I have this strange problem. It's very easy to reproduce:
Starting from this example: http://support.microsoft.com/kb/828736 I have tried to add a test function in
I'm playing around some tutorial code from this OpenCV 2 Cookbook . The code
I'm trying to write a simple little addon for Firefox Mobile, starting from this
Starting from this Question I discovered that using the powershell.exe.config to load .net Framework
I have to create html list from this code - ali - hammad -
I am just starting to learn OpenGL today from this tutorial: http://openglbook.com/the-book/ I got

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.