scilab

Error while Scilab module is loading

痴心易碎 提交于 2019-12-02 04:17:05
I downloaded module Metanet 0.6.2 and ran by Scilab atomsInstall After that i ran `atomsLoad('metanet')` but it shows atomsLoad: An error occurred while loading 'metanet-0.6.2': error(msprintf(gettext('%s module required."),'graph')); ^^ Error: Heterogeneous string detected, starting with ' and ending with ". at line 335 of function atomsLoad ( D:\Program Files\scilab-6.0.1\modules\atoms\macros\atomsLoad.sci line 351 ) Why did it happen so? It turns out that the metanet module is not supported by Scilab 6.0.1 yet. I had to install version 5.5.2. Unfortunately both the question and the accepted

How pass variables by reference to a Scilab function

笑着哭i 提交于 2019-11-30 09:52:18
问题 I want to have a Scilab function which is able to alter its input variables, For example in C I could have void double(int* x){ *x *= 2; return; } There are intppty , funptr , addinter , istk , sadr and stk in Scilab which seem to be relevant, however I can't find any working example. Scilab does have a pointer type (i.e. 128 ). I would appreciate if you could help me figure this out. P.S.1. I have also mirrored this question here on Reddit. P.S.2. Scilab also have intersci , SWIG , fort ,

How to convert a boolean array to an int array

℡╲_俬逩灬. 提交于 2019-11-29 20:13:23
I use Scilab, and want to convert an array of booleans into an array of integers: >>> x = np.array([4, 3, 2, 1]) >>> y = 2 >= x >>> y array([False, False, True, True], dtype=bool) In Scilab I can use: >>> bool2s(y) 0. 0. 1. 1. or even just multiply it by 1: >>> 1*y 0. 0. 1. 1. Is there a simple command for this in Python, or would I have to use a loop? BrenBarn Numpy arrays have an astype method. Just do y.astype(int) . Note that it might not even be necessary to do this, depending on what you're using the array for. Bool will be autopromoted to int in many cases, so you can add it to int

Include a Scilab function/script as a block in xcos/scicos

…衆ロ難τιáo~ 提交于 2019-11-29 18:02:04
As the title says I want to include a block where I can run a scilab expression/function/script given certain inputs. I can see xcos/scicos can include C, Fortran and Modelica. There is a Expression block: but the functions are pretty limited: sin, cos, tan, exp, log, sinh, cosh, tanh, int, round, ceil, floor, sign, abs, max, min, asin, acos, atan, asinh, acosh, atanh, atan2, log10. for example if I want to solve a second order equation of ax^2+bx+c=d there are no sqrt or power / ^ operators/functions! Ideally I want to just run a Scilab script/function where I can have complete freedom. I

replicate Arduino's serial monitor on Scilab consol

萝らか妹 提交于 2019-11-29 13:09:15
If I use the Arduino IDE's Serial monitor I can read the pair of comma separated values as below: I want to first replicate this behavior in SciLab terminal. I used the Serial Communication Toolbox : h = openserial(7, "9600,n,8,1") // open COM7 disp(readserial(h)) closeserial(h) which returns either empty or , 169 228, 179 228, 228, 205 228, 209 228, putting the disp(readserial(h)) in a while loop also doesn't help. Not only there are too many empty lines, if I stop the while loop it does not close the port (something like try-catch should be used I think). I would appreciate if you could help

Include a Scilab function/script as a block in xcos/scicos

不羁的心 提交于 2019-11-28 12:15:11
问题 As the title says I want to include a block where I can run a scilab expression/function/script given certain inputs. I can see xcos/scicos can include C, Fortran and Modelica. There is a Expression block: but the functions are pretty limited: sin, cos, tan, exp, log, sinh, cosh, tanh, int, round, ceil, floor, sign, abs, max, min, asin, acos, atan, asinh, acosh, atanh, atan2, log10. for example if I want to solve a second order equation of ax^2+bx+c=d there are no sqrt or power / ^ operators