shaifaliparashar / Cartan_sft_nrsfm

2 stars 1 forks source link

Incorrect dimensions for matrix multiplication #1

Open ad-fr-24 opened 1 month ago

ad-fr-24 commented 1 month ago

Running the example.m script throws the following error:

Error using  * 
Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix
matches the number of rows in the second matrix. To operate on each element of the matrix
individually, use TIMES (.*) for elementwise multiplication.

Error in example (line 28)
detr = J21a(idd,:)*J21d(idd,:)-J21c(idd,:)*J21c(idd,:);

Please verify if there are possibilities of a dimension mismatch there (or perhaps I got something wrong in the data)?

shaifaliparashar commented 1 week ago

change to point-wise multiplication.

detr = J21a(idd,:).J21d(idd,:)-J21c(idd,:).J21c(idd,:);

I have updated the file.

-- sorry for replying so late.

ad-fr-24 commented 6 days ago

Thanks for the update. But now I get:

  Unrecognized function or variable 'J12d'.

  Error in example (line 33)
  J12a = J12d(idd,:)./detr;
shaifaliparashar commented 5 days ago

Fixed now. Can you check?

ad-fr-24 commented 5 days ago

Sorry but now it says the following:

Index in position 1 exceeds array bounds. Index must not exceed 19.

Error in example (line 34)
detr = J21a(idd,:).*J21d(idd,:)-J21c(idd,:).*J21c(idd,:);
shaifaliparashar commented 5 days ago

should be good now.

ad-fr-24 commented 5 days ago

The first two methods work now, but I get the following error:

Brace indexing is not supported for variables of this type.

Error in compare_with_Pgth (line 7)
    q1 = q{1,i};

Error in solve_iso_con_sft_final (line 74)
    [P2{i},err_p{i}] = compare_with_Pgth(P_grid,u_all,v_all,qgth{i+1},Pgth(3*i+1:3*i+3,:));

Error in example (line 60)
[P23,Ni3,err_p3,err_n,P2c3,Nc,err_pc3,err_nc] = solve_iso_con_sft_final(Pg,Ng,qg,I1u,I1v,I2u,I2v,J21a,J21b,J21c,J21d,H21uua,H21uub,H21vva,H21vvb,th);
shaifaliparashar commented 4 days ago

Hi,

This is related to error computation. I am travelling at the moment and have limited access to the code. I shall fix it in 2 weeks.

Best, Shaifali Meeting room: Zoom https://cnrs.zoom.us/j/92599178003?pwd=RUhHNmljeUY4RWdLUjFUMzN0KzVYQT09

On Tue 2 Jul 2024 at 17:47, ad-fr-24 @.***> wrote:

The first two methods work now, but I get the following error:

Brace indexing is not supported for variables of this type.

Error in compare_with_Pgth (line 7) q1 = q{1,i};

Error in solve_iso_con_sft_final (line 74) [P2{i},err_p{i}] = compare_with_Pgth(P_grid,u_all,v_all,qgth{i+1},Pgth(3i+1:3i+3,:));

Error in example (line 60) [P23,Ni3,err_p3,err_n,P2c3,Nc,err_pc3,err_nc] = solve_iso_con_sft_final(Pg,Ng,qg,I1u,I1v,I2u,I2v,J21a,J21b,J21c,J21d,H21uua,H21uub,H21vva,H21vvb,th);

— Reply to this email directly, view it on GitHub https://github.com/shaifaliparashar/Cartan_sft_nrsfm/issues/1#issuecomment-2203608905, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADTAJJCXIE2RLBGJIL4QBBLZKLDRNAVCNFSM6AAAAABIYPOCZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBTGYYDQOJQGU . You are receiving this because you commented.Message ID: @.***>

shaifaliparashar commented 4 days ago

It is the solver for the NRSFM. I used gloptipoly, a polynomial solver, which is making it stochastic.

Best, Shaifali Meeting room: Zoom https://cnrs.zoom.us/j/92599178003?pwd=RUhHNmljeUY4RWdLUjFUMzN0KzVYQT09

On Wed 3 Jul 2024 at 13:10, ad-fr-24 @.***> wrote:

Is there a stochastic component to this method? Running the same script on the exact same data seems to produce slightly different results each time. Should this be an expected outcome?

— Reply to this email directly, view it on GitHub https://github.com/shaifaliparashar/Cartan_sft_nrsfm/issues/1#issuecomment-2205928923, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADTAJJCF5BN55L77C5S7ZUDZKPS4TAVCNFSM6AAAAABIYPOCZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBVHEZDQOJSGM . You are receiving this because you commented.Message ID: @.***>

shaifaliparashar commented 4 days ago

It should not give you significant differences.

Best, Shaifali Meeting room: Zoom https://cnrs.zoom.us/j/92599178003?pwd=RUhHNmljeUY4RWdLUjFUMzN0KzVYQT09

On Wed 3 Jul 2024 at 14:06, shaifali parashar @.***> wrote:

It is the solver for the NRSFM. I used gloptipoly, a polynomial solver, which is making it stochastic.

Best, Shaifali Meeting room: Zoom https://cnrs.zoom.us/j/92599178003?pwd=RUhHNmljeUY4RWdLUjFUMzN0KzVYQT09

On Wed 3 Jul 2024 at 13:10, ad-fr-24 @.***> wrote:

Is there a stochastic component to this method? Running the same script on the exact same data seems to produce slightly different results each time. Should this be an expected outcome?

— Reply to this email directly, view it on GitHub https://github.com/shaifaliparashar/Cartan_sft_nrsfm/issues/1#issuecomment-2205928923, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADTAJJCF5BN55L77C5S7ZUDZKPS4TAVCNFSM6AAAAABIYPOCZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBVHEZDQOJSGM . You are receiving this because you commented.Message ID: @.***>