Scilab Making GUI - scilab

How to use two functions in Scilab 5.5 GUI Building? For example, If I want to add and substract two numbers choosing a popupmenu option and execute it with a pushbutton option. Please reply, I am new in Scilab.

As a starting point I recommend to read tutorial about GUIs in Scilab.
for example, this

Related

Rstudio - keybord shortcut for multiple replacement in source window

I know it is possible to replace multiple items simultaneously in R. I have this sequence of commands:
How can I modify all the items that are in a box by only using the keyboard? I am aware of the find function and Keyboard Shortcuts Help, but that's not what I am looking for.
Maybe someone can suggest a nice summary of similar tricks and shortcuts? I have looked briefly on youtube, with no satisfactory findings.
Ctrl+Shift+Alt+M - Rename in scope
Shift+Alt+K - Keyboard Shortcut Quick Reference

How to use Fuzzy GUI editor in Scilab?

I've installed Fuzzy Logic Toolbox on Scilab 5.4.1
In Matlab we can write fuzzy in command line and use fuzzy GUI editor.
How to use Fuzzy GUI editor in Scilab?
I'm not familiar with the particular toolbox but using help sciFLT I found editfls, maybe this can help you on your way.

PyQt and matplotlib

I call a matplotlib function plt.show() from an PyQt application. I always have the warning:
QCoreApplication::exec: The event loop is already running
It seems that matplotlib called a new QCoreApplication which is already started
How can I do to remove this warning?
Thanks
If you are not generating multiple plots, the easiest way around is to use plt.ion() before you initialise the figure. Remove plt.show()
I ran into similar problems. The root cause is that your PyQt application uses Qt (which is of course obvious). But the matplotlib figure you're trying to make, also uses Qt. You know, the matplotlib figure has its own window, which originates from Qt. So there is a conflict.
Approach 1
There are several ways to solve it. One approach is explained here:
Matplotlib animation inside your own PyQt4 GUI
The link refers you to a stackoverflow question I've put online some days ago. I was trying to start a matplotlib animation from my own PyQt application.
Approach 2
The second approach is explained here:
Cannot move Matplotlib plot window and exit it using red X button
I hope this helped you out. If you've got any questions, don't hesitate to ask me. I'm happy to help.

Setting the title of the R console

One quick question to which I could not find answer.
I want to know if it is possible to set the title of the R console to something else (using RGui, on Windows).
The main use I'm thinking of is to show some kind of progress information when running a script which takes a long time to complete.
Any suggestions?
In windows you can use the setWindowTitle function, the name that you give it will show up in the top of the window or be the label on the icon when it is minimized.
I have the following line in my .Rprofile:
utils::setWindowTitle(getwd())
So that each instance of R has a label showing which folder/directory it was opened in (I often have several open at a time that I switch between as I work on different projects). This is nice for starting R by double clicking on the .Rdata file and keeping track of which window is which.
But for indicating the progress of a long running process the progress bars are probably the better approach. In windows you can use winProgressBar or on any platform you can use txtProgessBar or tkProgressBar (the tcltk package is needed for the 2nd). The growing bar is a quick visual of the progress and you can also use the label to give a specific iteration, or other information.

How read an analogue input in R? / or how to translate an existing Matlab code

I use a photoelectric cell to time an event in a response time experiment. It works well in Matlab, but I wanted to control it in R. Would any of you be able to help me translate the Matlab code to R?
global AI ch0
AI = analoginput('nidaq', 1);
AI.InputType = 'SingleEnded';
ch0 = addchannel(AI,0);
Thanks!
You could play around with the R.matlab package. This allows you to read your MAT files in R, so you could simply save the input and analyse it in R. Alternatively, you could interact directly between Matlab and R. I didn't try it out before, but it should be possible to call the matlab code from within R. The provided manual on CRAN shows you how.
http://cran.r-project.org/web/packages/R.matlab/index.html
There is a program called windmill:
http://www.windmill.co.uk/index.html
(windows only I think) that interacts with serial devices, you could probably use that to get the information from your device to a file or pipe and then have R read from there.
You could also do a search for "gps" at rseek or in the R-help archives, there have been a few times that people have posted questions and answers about reading location information directly from gps devices into R, some of those replies may work for you as well.
R does not support any kind of direct interaction with DAQ devices (at least for now). The only option you have is to write some C code to do this and bind it to R.
Write National Instruments and ask them to make an R package for their I/O devices. :)

Resources