Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some questions about GMMNLSE_ss_step.m #1

Open
landieyun opened this issue Apr 18, 2018 · 2 comments
Open

Some questions about GMMNLSE_ss_step.m #1

landieyun opened this issue Apr 18, 2018 · 2 comments

Comments

@landieyun
Copy link

Hi:
I want to run your process on CPU using the GMMNLSE_ss_step method, but there are some wrong when running it, can you help me, please? The question is below:

Error using .*
Matrix dimensions must agree.

Error in GMMNLSE_ss_step>get_dA_dz (line 99)
Vpl = dt*fft(hrw.*ifft(Vpl));

I checked hrw is a 327681 dimensional matrix, while Vpl is a 32768num_modes*num_modes dimensional matrix, so they can not multiply. On the other hand, when I set sim.fr = 0; sim.sw = 0; then Vpl will be Vpl = zeros(2^15,3,3,'single'); when I run the process again, there are some other wrong,

Matrix dimensions must agree.
Error in GMMNLSE_ss_step>get_dA_dz (line 110)
dA_dz = fft(prefactor.*ifft(Up));

So I want to know how to solve the question, besides, I don't understand the function dA_dz = get_dA_dz(A_t, dt, sim, mode_info, hrw, prefactor), I want to know the meaning of Up, Vpl, T_mn and want to understand how to solving nonlinear interactions.

I really want to run this program successfully, so please help me. At the same time thank you very much for sharing the source code.

@Chris-Mei1989
Copy link

I have met the same problem with you that Matrix dimensions must ageree. Have you solved it?

@AaHaHaa
Copy link

AaHaHaa commented Dec 20, 2018

I think you're using the old Matlab. Recent ones support automatic singleton expansion for matrix operations instead of having to use "bsxfun".

This can be solved by modifying the code into bsxfun(@times, hrw, iff(Vpl) ) but the point is there are probably some other matrix operations you need to modify with bsxfun.

About the meaning of each variable you mentioned, Up is the Kerr term, Vpl is the Raman term, and T_mn is the integrand of the Raman term.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants