scilab

Extract .mat data without matlab - tried scilab unsuccessfully

大兔子大兔子 提交于 2020-02-20 04:23:20
问题 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

Faster projected-norm (quadratic-form, metric-matrix…) style computations

最后都变了- 提交于 2020-01-23 01:42:08
问题 I need to perform lots of evaluations of the form X(:,i)' * A * X(:,i) i = 1...n where X(:,i) is a vector and A is a symmetric matrix. Ostensibly, I can either do this in a loop for i=1:n z(i) = X(:,i)' * A * X(:,i) end which is slow, or vectorise it as z = diag(X' * A * X) which wastes RAM unacceptably when X has a lot of columns. Currently I am compromising on Y = A * X for i=1:n z(i) = Y(:,i)' * X(:,i) end which is a little faster/lighter but still seems unsatisfactory. I was hoping there

Using a MATLAB code on Scilab

一个人想着一个人 提交于 2020-01-22 14:34:10
问题 Is it possible to use a MATLAB code on Scilab? Is that what is meant when saying that Scilab is a "clone" from MATLAB? 回答1: 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

Using a MATLAB code on Scilab

混江龙づ霸主 提交于 2020-01-22 14:34:10
问题 Is it possible to use a MATLAB code on Scilab? Is that what is meant when saying that Scilab is a "clone" from MATLAB? 回答1: 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

Solving ODE in Scilab

社会主义新天地 提交于 2020-01-15 06:24:00
问题 I am trying to do some electric circuit analysis in Scilab by solving an ODE . But I need to change an ODE depending on current value of the function. I have implemented the solution in Scala using RK4 method and it works perfectly. Now I am trying to do the same but using standard functions in Scilab . And it is not working. I have tried to solve these two ODEs seperately and it is OK. clear state = 0 // state 0 is charging, 1 is discharging vb = 300.0; vt = 500.0; r = 100.0; rd = 10.0; vcc

Solving ODE in Scilab

感情迁移 提交于 2020-01-15 06:23:04
问题 I am trying to do some electric circuit analysis in Scilab by solving an ODE . But I need to change an ODE depending on current value of the function. I have implemented the solution in Scala using RK4 method and it works perfectly. Now I am trying to do the same but using standard functions in Scilab . And it is not working. I have tried to solve these two ODEs seperately and it is OK. clear state = 0 // state 0 is charging, 1 is discharging vb = 300.0; vt = 500.0; r = 100.0; rd = 10.0; vcc

statistics wiht large amount of data in C++ or Scilab or Octave or R

≡放荡痞女 提交于 2020-01-07 04:20:10
问题 I recently need to calculate the mean and standard deviation of a large number (about 800,000,000) of doubles. Considering that a double takes 8 bytes, if all the doubles are read into ram, it will take about 6 GB. I think I can use a divide and conquer approach with C++ or other high level languages, but that seems tedious. Is there a way that I can do this all at once with high level languages like R, Scilab or Octave? Thanks. 回答1: It sounds like you could use R-Grid or Hadoop to good

Scilab, backdoor error, octave conflict

╄→尐↘猪︶ㄣ 提交于 2020-01-05 08:18:13
问题 I installed scilab.6.0.0 and backdoor fromscilab website (which I could not find it from Application>Module maneger>atom>Technical). I moved the backdoor file my home and from scilab command line I installed it -->atomsInstall('/home/user/BackDoor_0.2_5.5.bin.x86_64.linux.tar.gz') Even though, it installed backdoor successfully, when I restart the scilab I got this error message with backdoor Start Toolbox BackDoor Load macros atomsLoad: An error occurred while loading 'BackDoor-0.2': lib:

How can I create variables Ai in loop in scilab, where i=1..10

寵の児 提交于 2019-12-25 04:28:10
问题 I'm using scilab. Basically i want the same as this guy Create 'n' matrices in a loop or this guy http://www.mit.edu/~pwb/cssm/matlab-faq_4.html#evalcell The answer is not working in scilab, and I can not manage it to do the same in scilab. Can someone help me. 回答1: If I get your intention right, you want to use dynamic variable names (=variable names are not hardcoded but generated during execution). Is that correct? As others already pointed out in the linked posts (and at many other places

read the latest line of a serial port

大憨熊 提交于 2019-12-25 00:51:14
问题 I haven't ever written any code in tcl and pretty novice on serial communication, so sorry in advance if my question doesn't make sense. I'm trying to solve this problem where I want to listen to a serial port and print the updates line by line in SciLab like a normal serial terminal (e.g. Arduino's serial monitor). The Serial Communication Toolbox for Scilab has a readserial macro (source on GitHub): function buf=readserial(h,n) if ~exists("n","local") then N=serialstatus(h); n=N(1) end TCL