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

Concerning Bretschneider #4

Open
Coucou2016 opened this issue Mar 27, 2023 · 1 comment
Open

Concerning Bretschneider #4

Coucou2016 opened this issue Mar 27, 2023 · 1 comment

Comments

@Coucou2016
Copy link

After download the package, I tried to run the script example_waveFields_1.m, which seems to me a good start point.
I find that there is an error about the name consistency of the bretschneider class. I changed the name bretschneider to Bretschneider in both the folder and the script and solved this problem.
However, I continue to find a new error about not defining * for the class Bretschneider in the line
SG = S'*G; % create a matrix of the spectral amps
I know that it is due to the fact that matlab can not use * for a newly created class by you, but I still don’t know how to correct it.

I would like to ask you, if possible, to help me address my issues, If you have the time. I would greatly appreciate any help you can provide.

Thank you very much for your time and patience. I look forward to hearing from you.

@acotten1
Copy link
Collaborator

Hello and sorry for the delay in replying. In place of the original code that called a (now seemingly non-existent) 'bretschneider' function, you should use
S = Bretschneider.MakeSpec(Hs, 1./fm, 1./f); % Bretschneider spectrum
Notice that I am using the method on the Bretschneider class, so that a numeric vector is returned. Notice also that this class is expecting inputs in terms of period, hence the change to 1./ inputs.

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

2 participants