Two variable function computation
조회 수: 1(최근 30일)
I am trying to reproduce the Matlab plot I found in a research paper. The function in P(t,z) (it is time and space dependent). P(t,z) have two parameters (alpha and beta) which are frequency dependent.
I have two loops for computing P(t,z). My code is below, however, I can't find a similar solution which what is mentioned. This is my code
p = zeros(length(x),length(t));
for it= 1:length(t)
Any help will be appriciated.
Walter Roberson 2017년 1월 31일
Your expression just does not act like that, at least not over those parameter ranges.
See attached that explores a number of possibilities. (Note the vectorized implementations of the equations.) I put up several isosurface plots to explore the way the surface grows along the 4 different parameters. The last couple of plots explore the possibility that your x is too small or too large. The last one does suggest that possibly the x range should be much smaller; for example if you were to use x/200 then it would have room for only one peak.
On the isosurface plots notice that I plot the real component of p rather than the absolute magnitude. The absolute magnitude are completely boring; plotting the real component at least allows you to track through a couple of phase cycles.