Questions tagged [scilab]

Scilab is a free and open source, cross-platform numerical computational package and a high-level, numerically oriented programming language. It can be used for signal processing, statistical analysis, image enhancement, fluid dynamics simulations, numerical optimization, and modeling and simulation of explicit and implicit dynamical systems.

scilab
Filter by
Sorted by
Tagged with
0 votes
1 answer
137 views

How to pass simulation context into Scilab C block?

I have been developing my own function block in Scilab/Xcos on the C block basis and I have been struggling with passing parameters defined in the simulation context into the C code. Does anybody know ...
Steve's user avatar
  • 825
1 vote
1 answer
2k views

C language usage in Scilab Xcos block

I have been attempting to get my own Scilab Xcos block written in C language up and running. I have been using Scilab 5.5.2 running on Windows 10 with Cygwin installed. I have started with the freely ...
Steve's user avatar
  • 825
0 votes
1 answer
456 views

How to set parameters in Scilab blocks from SciPad?

I don't know if anyone faced the same problem! In MATLAB, we can easily set the parameters of Simulink blocks from m-files. For example, we can change the coefficients of transfer functions, PID gains,...
Sitra's user avatar
  • 3
0 votes
1 answer
103 views

unable to solve ODE with zdot function

I have a problem with plotting RLC circuit with zdot function in Scilab . I have worked out the analytical calculation: Vin = ( VR/(s^2*L*C)+ VR/(s*R*C) + VR ) // R = 11 Ohm, R = 0.012 F, L = ...
HAFIZ NOUFAL's user avatar
2 votes
2 answers
356 views

3D Ploting in Scilab: Weird plot behaviour

I want to plot a function in scilab in order to find the maximum over a range of numbers: function y=pr(a,b) m=1/(1/270000+1/a); n=1/(1/150000+1/a); y=5*(b/(n+b)-b/(m+b)) endfunction x=linspace(...
sergiu reznicencu's user avatar
0 votes
1 answer
37 views

I'm trying to graph a function for different values of Chi and Wn?

I'm trying to graph a function for different values of Chi and Wn. Here's the function. A1=0.1 A2=0.2 A3=0.3 //Valores de chi A4=0.4 A5=0.5 B1=29 B2=30 B3=65 //valores deW B4=80 B5=100 C=1 ...
Bibianne Castañeda's user avatar
2 votes
1 answer
104 views

Scilab unwrap function

p(1)= 0. p(2)= 0.6771057 p(3)= 0.8277359 p(4)= 1.3828832 p(5)= 1.7971431 p(6)= 2.1882188 p(7)= 2.6911235 p(8)= 3.1073485 p(9)=-2.7161114 p(10)=-2.3440447 q=unwrap(p,2*%pi) gives a wrong result. -2*...
user12274423's user avatar
0 votes
2 answers
162 views

scilab save('-append') doesn't seem to work

I am trying to create a dataset for ML using Scilab, and I need to save during data generation because it's too big for scilab's max stack. Here is a toy example I made to find out what goes wrong but ...
user13810846's user avatar
0 votes
0 answers
59 views

why getString functions in api scilab giving errors?

All the getString functions mentioned in this document are giving errors. I have even tried the example code given on this link which also not working https://help.scilab.org/docs/6.0.2/en_US/...
Shubham kirve's user avatar
0 votes
2 answers
1k views

Scilab unable to correctly read text and csv file

I wish to open and read the following text file in Scilab (version 6.0.2). The original file is an .xlsx that I have converted to both .txt and .csv through Excel to facilitate opening & working ...
Julia_26's user avatar
0 votes
1 answer
47 views

how to add multiple files in Linker_Flag variable in scilab?

I am working with Scilab version 6.1.0 and OS is Ubuntu 18.04. I was working to add a toolbox to Scilab for an already existing library. I have interfaced two functions of library in Scilab separately....
Shubham kirve's user avatar
0 votes
0 answers
116 views

"addinter: The shared archive was not loaded "libtest_toolbox.so: undefined symbol: USER_ERROR__inconsistent_build_configuration__see_dlib_faq_2"

While executing loader.sce commands in scilab I am getting following error: exec loader.sce --> // This file is released under the 3-clause BSD license. See COPYING-BSD. --> // Generated by builder....
Shubham kirve's user avatar
0 votes
1 answer
111 views

Save Scilab's ode output to table

I have a system of ODEs solved in Scilab via x=ode(x0,t0,t,syst); I would like write the output to csv/tsv file with every row corresponding to each time step and columns representing variables in x....
stanislav-iablokov's user avatar
1 vote
4 answers
7k views

How do i get Scilab 6.1.0 working on ubuntu 20.04?

I've installed the ubuntu repo of Scilab 6.1.0 and ive been trying to run it, The error message i get is WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective ...
Cpreet's user avatar
  • 168
0 votes
1 answer
98 views

Solve equation of mean field theory with Scilab

i try to evaluate the equation =tanh(zJ/k_B T) using newton rampson method. when i run the program i got an error: plot: Wrong size for input arguments #2 and #3: Incompatible dimensions. and a ...
akanksha patel's user avatar
0 votes
1 answer
349 views

Scilab Invalid Index

I already new learn Scilab. I want to ask about, why when I used matrix in my script it showed "invalid index" on my compiler. In this case, I want to rewrite my python code into the scilab code. ...
Ericka Huang's user avatar
1 vote
1 answer
2k views

SWIG/Scilab: RuntimeError: the module is not initialized

I get this error message despite that IPCV module is loaded at the start: SWIG/Scilab: RuntimeError: the module is not initialized . Here is my code: f=figure('figure_position',[400,50],'figure_size',...
Youssef Maghrebi's user avatar
0 votes
0 answers
124 views

switching between frames or windows in scilab

Hi I am new to scilab and I am working on a small gui application and I want to know if there is a way to make the callback function of push_button switch to another window. What should I write in the ...
Youssef Maghrebi's user avatar
0 votes
1 answer
215 views

L-J Potential by Scilab

I am actually Plotting the lj potential curve for sigma=2.74 and epsilon=0.0031.Below is my code. function [V,r]=lj(si,e) for i=1:3 si=si*(1+(i-1)*0.1) r=linspace(0.75,8,1000)...
Anshul Sharma's user avatar
0 votes
1 answer
204 views

Global variables Xcos

I am new to Xcos. Is there a way for a block to read or write to a variable that other blocks could also access? or if there is a work around to achieving the same. Thanks
kersi's user avatar
  • 1
1 vote
1 answer
148 views

problem in the if-else condition in scilab

I was writing a SSTF disk scheduling algorithm code in SCILAB and during running after displaying first 3 values (41,34,11) correctly its always showing head at -1. Can somebody tell whats the problem ...
well...'s user avatar
  • 31
0 votes
1 answer
615 views

How can I open Scilab in my Windows console?

How can I open Scilab in my Windows console? I have it installed and I see it when I search in the search bar but I don't know how to run it inside my console. I would like to use it inside my ...
John's user avatar
  • 237
1 vote
1 answer
5k views

scilab sending java main-class error and doesn't wanna work

scilab was working just fine 2 weeks ago but now after i updated software ubuntu if i try to open it nothing happens and if i try to open it using Terminal i get this error WARNING: An illegal ...
Kaspercold 1's user avatar
1 vote
1 answer
441 views

Scilab xcos integrator

I have been facing a problem how to generate event signals based on value at the integrator block in Scilab Xcos. For example I need to create event signal in case value at the output of the ...
Steve's user avatar
  • 825
0 votes
1 answer
902 views

SciLab -> problem with graphics -> black window

I tried to use Xcos for any basic simulation, but I obtained a blank/black window, instead the graph. https://drive.google.com/file/d/1AN78dFcH6eYs5ajpmGj4qtqH40smoghc I was thinking that maybe I ...
Piotr Kozierski's user avatar
3 votes
1 answer
251 views

Find the smallest root of the equation in scilab

I need to find the smallest absolute root of the equation with an accuracy of 0.00001 using scilab. The equation itself: x - cos (1.04 * x) = 0. Need to build a graph to determine the interval at ...
lapos's user avatar
  • 33
1 vote
3 answers
113 views

How to plot the function 4(x)^2 = ((y)^2/(1-y))?

I want to plot the function 4(x)^2 = ((y)^2/(1-y)); how can I plot this? --> 4*(x) = ((y^2)*(1-y)^-1)^0.5; 4*(x) = ((y^2)*(1-y)^-1)^0.5; ^^ Error: syntax error, unexpected =, expecting ...
PRANJAL RAJ CHOUHAN's user avatar
1 vote
1 answer
273 views

how to resolve error in plotting polar plot in scilab

operation -: Warning adding a matrix with the empty matrix will give an empty matrix result. at line 1 of executed string at line 176 of function polarplot ( C:\PROGRA~1\SCILAB~1.2\...
Arpit Lekurwale's user avatar
1 vote
1 answer
198 views

Error in plotting a polar plot using scilab

at line 5 of executed file C:\Users\LAPTOP\8a.sce Inconsistent row/column dimensions. clc close clf s=0:.1:2*%pi; h=10/(1+5*s); polarplot(s,h);
Arpit Lekurwale's user avatar
0 votes
2 answers
131 views

Amplitude increasing in the verlet method in backward difference

I am facing trouble in the increasing oscillation on a simple harmonic oscillator using a backward difference. here is my code in Scilab function [x] = back(h, tf) k = 2; m = 1; i = 2; t(i - 1) = 0; ...
Anshul Sharma's user avatar
1 vote
0 answers
115 views

SCILAB code for searching the center of figure

I'm looking for the center of the figure in green in terms of a point with these coordinates (X, Y) that I posted: I tried to apply Guldin's method, looking for the center of gravity, the moment of ...
Faical Mekkaoui's user avatar
0 votes
0 answers
495 views

How to efficiently read binary file in Scilab? Why doesn't readb work?

Scilab documentation for all versions shows that readb is the exact function I'm looking for but it is not recognized by the interpreter (I get Undefined variable: readb) I'd love to use pileofdata = ...
Matt C.'s user avatar
0 votes
1 answer
365 views

Is there any solution to the error while loading SIVP module to scilab

SIVP - Scilab Image and Video Processing Toolbox Load macros atomsLoad: An error occurred while loading 'SIVP-0.5.3.2': lib: Old binary lib detected. Please recompile it for Scilab 6. help me ...
ashoka kumara's user avatar
0 votes
1 answer
360 views

Why Scilab does not show 3D plots?

I'm new to scilab so working out basics.Below script opens the graphics window shows the empty box.I guess a straight line should be shown for these x,y,z points which doesn't show up here.Why is ...
user avatar
0 votes
2 answers
826 views

Error while loading the Code Generator toolbox in Scilab

I installed Scilab 5.5.2 on Windows 10, and then installed the Scilab Code Generator toolbox. However, when I start Scilab, the following message appears and I can't use the toolbox. This problem ...
Hikari's user avatar
  • 11
0 votes
1 answer
378 views

Scilab algorithm - recursion

I have a code written in Scilab: function v=myhorner2(a,x) N=length(a) v=a(1) for i=2:N do v=v*x+a(i)) end endfunction which is working well. Now I need to do the recursion ...
nmpop's user avatar
  • 1
0 votes
1 answer
116 views

Understanding issue in Scilab for my code

I am doing a projectile motion where i need to plot curves between position x and y for various angles but the scilab shows only one plot. I am confused. My code below function[H,R,T]=projectile(m,r,...
Anshul Sharma's user avatar
0 votes
0 answers
183 views

How to make an algorithm to find a mode in Scilab without using built-in functions and with O(N)?

So the code I currently have is: T=[2,3,4,3,4,5,2] x=1 TA(x)=0 for k=1:n do x=T(k) TA(x)=TA(x)+1 k=k+1 y=max(TA) if TA(x)==y then disp(x) else disp('There is no ...
polskacoder's user avatar
0 votes
1 answer
82 views

How to know if there is a different element in one array in Scilab?

My goal is to check if there are misplaced objects in one array. for example the array is 2. 2. 2. 2. 2. 1. 3. 1. 3. 3. 3. 1. 3. 1. 1. 1. 1. I ...
Dzeija's user avatar
  • 25
0 votes
3 answers
211 views

Optimization, time complexity and flowchart (Scilab)

I tried to optimize this code, but it’s impossible to optimize anymore. Please help with building a flowchart for this algorithm. A = [-1,0,1,2,3,5,6,8,10,13,19,23,45]; B = [0,1,3,6,7,8,9,12,45]; N1 ...
SwissMan's user avatar
-1 votes
1 answer
501 views

Palindrome algorithm in Scialb

Could you help me to construct an algorithm in Scilab that searches for the longest palindrome in a zero-one sequence of n - elements. The output should be given the length of the palindrome and ...
EvZhenua 's user avatar
0 votes
2 answers
97 views

Who can shorten / modify / simplify Scilab code ( and JavaScript code)? Search for excess in code

Scilab 6.0.2 function [a, ka] = srty(a, b, orien) // returns a values which are not in b // orien="r"|"c" added, including the hypermat case rhs = argn(2); // CHECKING INPUT ...
SwissMan's user avatar
0 votes
1 answer
519 views

My first Scilab algorithm - Horner's method

this is my first Scilab algorithm (Horner's method). Please tell me what should I correct to make it working (according to this flowchart). I am a very beginner. Your feedback will be highly ...
nmpop's user avatar
  • 1
1 vote
1 answer
346 views

Scilab - How to plot numbers v string

Say I have been tracking my weight each month (on and off for a couple of years), and I want to plot the data, such that: the x-axis represents the time. e.g. Jun 2015, Jul 2015, Aug 2015, Sept 2015. ...
Aziz's user avatar
  • 91
0 votes
2 answers
181 views

How do I save the indices of the top 4 maximum numbers in a matrix in scilab

I need to save the indices of 4 maximum numbers for example, I need to get the indices of rows 10,9,7,5 5.0259327 4.7127487 4.8435524 4.8538644 5.1048996 6.2441973 5.9413803 6.2912638 5.1117512 5....
Dzeija's user avatar
  • 25
0 votes
1 answer
110 views

2D line color gradient from a third variable

I have created a code to visualize the deformation as well as the stress in a stress structure. So far so good. The strain is displayed as a function of the x and y of each element. The stress is ...
Alexis Allier's user avatar
0 votes
1 answer
108 views

Why can't I read all of the values in the matrix in scilab?

i am trying to read a csv file and my code is as follows param=csvRead("C:\Users\USER\Dropbox\VOA-BK code\assets\Iris.csv",",","%i",'double',[],[],[1 2 3 4]); //reads number of clusters and features ...
Dzeija's user avatar
  • 25
0 votes
2 answers
48 views

How to scan matrix by row after using csvRead in Scilab?

data=csvRead("C:\Users\USER\Desktop\Iris.csv",",","%f"); Is the code I used in Scilab to read the file which contains this: 5.1,3.5,1.4,0.2,Iris-setosa 4.9,3.0,1.4,0.2,Iris-setosa 4.7,3.2,1.3,0.2,...
Dzeija's user avatar
  • 25
0 votes
1 answer
85 views

Where is the problem in my Forward Difference Table using Scilab?

So, i have to interpolate function f(x) like this. x = 0:0.1:2.8; y = [0 0.717 0.999 0.675 0.0583 0.7568 0.9961 0.6312]; Here's the code i got at the moment. clc clear x = 0:0.1:2.8; y = [0 0.717 0....
Ramsey's user avatar
  • 5
1 vote
1 answer
99 views

How to make a graphic window modal in scilab?

What property of the figure should be set to make it modal? I want to prohibit user interaction with the main program window while my dialog window is open. But there does not seem to be a property ...
Vadim Mikhryutin's user avatar

1
3 4
5
6 7
18