scilab

atomsInstall can't find the mingw compiler installed through chocolatey

左心房为你撑大大i 提交于 2019-12-11 09:07:32
问题 Following this question, I'm not quite sure where the problem is so I add tags for all the components involved. I'm trying to use the MinGw compiler inside Scilab. There is a mingw atom which supposedly should be installed by atomsInstall('mingw') which returns empty and atomsLoad('mingw'); which returns the error: Mingw Compiler support for Scilab Load macros WARNING: MinGW Compiler not detected. Load help and the haveacompiler() returns false F , although I have the compiler installed

Odd behavior of ODE in Scilab: equation dy/dx=A is not solved properly

て烟熏妆下的殇ゞ 提交于 2019-12-11 07:39:20
问题 I am still learning Scilab (5.5.2), so I am writing and running test codes to familiarize myself with the software. To test the numerical differential equation solver, I started easy from the equation dy/dx = A , which has as solution y = Ax+c (line equation). This is the code I wrote: // Function y = A*x+1 function ydot=fn(x, A) ydot=A endfunction A=2; //Initial conditions x0=0; y0=A*x0+1; //Numerical Solution x=[0:5]; y= ode(y0,x0,x,fn); //Analytical solution y2 = A*x+1; clf(); plot(x, y);

Python/Scilab bridge: scilab2py error

一世执手 提交于 2019-12-11 07:36:54
问题 I'm a newbie to Python but have experience in MATLAB/Scilab. I'm creating a mathematical model in Scilab, but the input data is generated from a Python (2.7) code. As a result, I'm trying to make use of the Python module scilab2py (see http://blink1073.github.io/scilab2py/source/installation.html) in order to run Scilab from inside Python to allow the process to be much simpler. I installed all the required Python modules for scilab2py (i.e. Scipy, Numpy) and have Scilab installed in my PATH,

finding intersection point using scilab

北慕城南 提交于 2019-12-11 04:28:42
问题 How can I find intersection points in the graph shown below using fsolve function (from scilab ) ? Here is what I've tried so far: function y=f(x) y = 30 + 0 * x; endfunction function y= g(x) y=zeros(x) k1 = find(x >= 5 & x <= 11); if k1<>[] then y(k1)= -59.535905 +24.763399*x(k1) -3.135727*x(k1)^2+0.1288967*x(k1)^3; end; k2=find(x >= 11 & x <= 12); if k2 <> [] then y(k2)=1023.4465 - 270.59543 * x(k2) + 23.715076 * x(k2)^2 - 0.684764 * x(k2)^3; end; k3 = find(x >= 12 & x <= 17); if k3 <> []

Implicit differentiation with Scilab?

别说谁变了你拦得住时间么 提交于 2019-12-08 03:17:13
问题 Can somebody tell me how to implicitly differentiate equations in Scilab ? Example: x^2+y^2=25 (a circle equation) The derivative is: dy/dx=−x/y How can we accomplish this implicit differentiation in Scilab? May be with diff or dassl or another function of Scilab? 回答1: Scilab is oriented to numerical computations. You can go to http://www.wolframalpha.com and type "differentiate x^2 + y^2 = 25 in x" into the input box. 来源: https://stackoverflow.com/questions/34560820/implicit-differentiation

Creating Animation in Scilab

余生颓废 提交于 2019-12-03 21:56:23
I am able to plot a point using the x and y coordinates using the following code. figure(1); plot(x(1),y(1),'o'); h_compound = gce(); h_compound.children.mark_size = 20; h_compound.children.mark_background = 2; h_axes = gca(); h_axes.data_bounds = [0,0;100,100]; My program contains a loop which keeps on refreshing the coordinate values. Every time the loop is executed the point is plotted in the same graphic, such that the new points overlap the older ones. How do I make the old points disappear as the new points are plotted so that an animation-like sequence is generated? scf(1);clf; x

Extract .mat data without matlab - tried scilab unsuccessfully

∥☆過路亽.° 提交于 2019-12-03 16:51:55
I've downloaded a data set that I am interested in. However, it is in .mat format and I do not have access to Matlab. I've done some googling and it says I can open it in SciLab. I tried a few things, but I haven't found any good tutorials on this. I did fd = matfile_open("file.mat") matfile_listvar(fd) and that prints out the filename without the extension. I tried var1 = matfile_varreadnext(fd) and that just gives me "var1 = " I don't really know how the data is organized. The repository described the data it contains, but not how it is organized. So, my question is, what am I doing wrong in

Using a MATLAB code on Scilab

久未见 提交于 2019-12-03 14:15:14
Is it possible to use a MATLAB code on Scilab? Is that what is meant when saying that Scilab is a "clone" from MATLAB? I would not bet on it. But if your code is simple enough chances are good. Problems are: There is encrypted p-code in Matlab that Scilab will not be able to open. Matlab usually comes with a number of toolboxes that might not be available to you (i think especially Simulink) last but not least (i don't know about scilab) there usually are minute differences in how functions are implemented. Jebsam Yes you can use MATLAB code on scilab. See these links for more information:

Error while Scilab module is loading

痞子三分冷 提交于 2019-12-02 10:46:36
问题 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? 回答1: It turns out that the metanet module is not

Are there C like pre-processor directives for Octave and Scilab to be used for intercompatible code?

谁都会走 提交于 2019-12-02 04:47:54
In C / C++ languages one can use macros or as called "per-processor directives" to instruct the compiler how the code should be read. The simple commands of #def , #ifdef , #ifndef , #else , #endif ... give the compiler the ability to check for Operating system, compiler and other environment information. I know Octave and Scilab are interpreted languages, but I'm wondering if is there any way to tell the interpreter to replaces parts of script while loading it? For example can I write a code which is commented based on Scilab syntax // and then instruct the interpreter to read them as Octave