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

Matrix dimensions must agree. #1

Open
jodyngo opened this issue Oct 21, 2019 · 3 comments
Open

Matrix dimensions must agree. #1

jodyngo opened this issue Oct 21, 2019 · 3 comments

Comments

@jodyngo
Copy link

jodyngo commented Oct 21, 2019

I am running the code and the program shows below error

Error using .*
Matrix dimensions must agree.

Error in OnlineDMD/initialize (line 86)
Xq = Xq.*weight;

Error in online_demo (line 79)
odmd.initialize(x(:,1:q),y(:,1:q));

Could you please help me resolve it!

@haozhg
Copy link
Owner

haozhg commented Mar 8, 2020

Try Xq = Xq * weight? I did not seem to find the <.*> operation in my code, could you please direct me to the line of code?

@jodyngo
Copy link
Author

jodyngo commented Mar 9, 2020

Please refer to below link

Xq = Xq.*weight;

@haozhg
Copy link
Owner

haozhg commented Feb 18, 2021

Hey, so the matrix must be of shape (n, q) (q by n will not work), where n is state dimension and q is the first q snapshots (q > n). See this https://github.com/haozhg/odmd-matlab/tree/main/matlab for example usage.
Also, i would recommend using the python implementation: https://github.com/haozhg/odmd#use-pip, just need pip install odmd

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