odmd
odmd copied to clipboard
Matrix dimensions must agree.
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!
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?
Please refer to below link https://github.com/haozhg/odmd/blob/b75539a3f9b1cc967b0f0d94af68e48f06983a78/matlab/OnlineDMD.m#L86
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