在Octave中运行Matlab脚本时,print_usage和fzero发生错误

问题描述 投票:0回答:1

我正在尝试从Octave-5.1.0.0的https://www.sigma-clermont.fr/en/ferum运行inputfile_calrel_example1 FERUM Matlab脚本,但在print_usage和fzero方面遇到如下错误:

error: Invalid call to fzero.  Correct usage is:

 -- fzero (FUN, X0)
 -- fzero (FUN, X0, OPTIONS)
 -- [X, FVAL, INFO, OUTPUT] = fzero (...)
error: called from
    print_usage at line 91 column 5
    fzero at line 133 column 5
    drho0_dthetaf_integral at line 75 column 22
    mod_corr_solve at line 99 column 54
    form at line 90 column 58
    ferum at line 129 column 33
>>

浏览print_usage.m文件将显示第91行,如下所示:

   error ("Octave:invalid-fun-call", msg);

78至92行:

    if (at_toplev)
    error ("Octave:invalid-fun-call",
           "Invalid call to %s.  Correct usage is:\n\n%s\n%s",
           name, usage_string, __additional_help_message__ ());
  else
    msg = sprintf ("Invalid call to %s.  Correct usage is:\n\n%s",
                   name, usage_string);
    ## Ensure that the error doesn't end up with a newline, as that disables
    ## backtraces.
    if (msg(end) == "\n")
      msg(end) = " ";
    endif

    error ("Octave:invalid-fun-call", msg);
  endif

以及零线132至134如下:

  if (nargin < 2 | nargin > 3)
    print_usage (mfilename ());
  end

我想提供有关如何解决以上错误消息的提示。

最好的问候Aliyu Aziz

matlab octave
1个回答
0
投票

如评论中所述,fzero用以下参数调用。

© www.soinside.com 2019 - 2024. All rights reserved.