Wrong type for input argument #1: A real matrix expected. https://www.umr-cnrm.fr/spip.php?article23&lang=e

Hello, I executed the code, but I faced this issue. Could someone more knowledgeable please take a look?

Hello,

Welcome to Scilab discourse !

As a new user you may (or may not, apparently) have read the forum guidelines (see Welcome to the Scilab discourse forum!), hence your message can be quite confusing for people who will try to help you: I mean, pasting a bunch of code without even saying “hello” is not very engaging.

Since the author of this code is a real person, why don’t you try to contact him directly? If you don’t succeed in that first step, we can help you if you focus more your question.

S.

Thanks for the reminder, I tried running and solving this bug myself but it didn’t work out in the end

You already had a partial aswer in another post (please avoid cross-posting on the same subject) for stacksize which is obsolete since Scilab 6.0. A quick look at the files shows other obsolete constructs (the files were written for Scilab 5). They can be detected by running examples/main_3x.sce:

cd RofPack_v1-0/examples/
exec("main_3x.sci")
  • in main_3x.sci remove line 23: stacksize(2*10^8)
  • in consist_mc_tls.sci remove line 79: return d_cons_H0 and add endfunction instead
  • in gke.sci remove line 22: return pv

the main_3x.sci script should run with output:

  "Residual Consistency Check"


--> // Main output: Beta_hat

--> Beta_hat = zeros(3,I);

--> Beta_hat = [beta_hat_inf; beta_hat; beta_hat_sup];

and the Beta_hat matrix value is

--> Beta_hat
 Beta_hat  = 

   0.3289068  -1.3307499   0.3404284
   0.7174227  -0.0289888   0.8981243
   1.0327693   1.005474    1.5890112
1 Like

Thank you, I get it.