Error while Scilab module is loading

后端 未结 2 804
梦如初夏
梦如初夏 2021-01-25 23:55

I downloaded module Metanet 0.6.2 and ran by Scilab

atomsInstall

After that i ran

`atomsLoad(\'metanet\')` 

相关标签:
2条回答
  • 2021-01-26 00:56

    Unfortunately both the question and the accepted answer here in this page are very vague and misleading. Ideally these kind of posts should be blocked / down-voted, but I will try to answer it as much as i can.

    Firstly when you want to run a Scilab command you do not put it in quotation marks, unless you want to use execstr command. However the characters you have used are not quotations but backticks! I'm not sure why you have done that.

    Secondly, the error:

    Error: Heterogeneous string detected, starting with ' and ending with "

    happens when double quotation is sued inside the single quotation or vise versa:

    "This is a' string"
    'this is a" string'
    

    to solve the issue you should change the above strings to

    "This is a'' string"
    'this is a'" string'
    

    basically adding one single quotation before any of the ' and " characters to turn them into literal ' and ".

    bonus point if you want to pass a string to Tcl use curly brackets

    TCL_EvalStr("set myVar {Hello World!}")
    

    or

    TCL_EvalStr("set myVar '"Hello World!'"")
    

    but for PowerShell

    powershell('$myVar= ''Hello World!''')
    

    or

    powershell("$myVar= ''Hello World!''")
    
    0 讨论(0)
  • 2021-01-26 01:02

    It turns out that the metanet module is not supported by Scilab 6.0.1 yet. I had to install version 5.5.2.

    0 讨论(0)
提交回复
热议问题