![]() It is important to note that the two conditions (x and y coordinates) must be both inside the command ‘find’ and just be separated by the ampersand to satisfy both condition at the same time.įigure 5 is a sinusoidal wave generated by multiplying a ones matrixelement by element to a sine wave along the x coordinates and the x coordinate values was multiplied by 20 to display several wave cycles. The next figure (Figure 4) is a square which is rendered using the same concept but instead of the radius, all with absolute values of x and y coordinatesless than the desired half of the length of the sides were the ones’ corresponding element changed into 1. For all the generated images, I used 1000 by 1000 zero matrix and two 1000 by 1000 matrix with equally spaced values ranging from -1 to 1 onefrom left to right and the other one from top to bottom which serves as the x and y coordinates of the zero matrix.įigure 3 is a circle generated using the given code in the manual where it calculatethe element per element radius from the values of x and y coordinates.If the calculated radius is less than the desired radius, the corresponding element in the zero matrix is changed to 1. Also, I used the command mesh to visualize a 3D representation of the 2D matrix. Sine plot generated using Scilab.įor the next part, we were tasked to generate different shapes and images which are shown in Figures 3-10. ![]() In Scilab, t and y already have same dimension and it does not need loops to generate the sine plot which makes the Scilab (and Matlab) faster, have lesser number of lines and more convenient in dealing with large number of data compared to other languages.įigure 1.Scilab code for generating sine plot.įigure 2. The code is composed of three lines: assignment of variables t and y variables and the plotting command as shown in Figure 1. This activity serves as an introduction tutorial on the basics of Scilab and Matlab and makes us utilized their different features on matrix manipulation.įirst,we were supposed to plot a sine wave using the sample code given in the manual. ``python -m scilab_kernel install -help`` for available options.Matlab and Scilab are scientific programming language commonly used for arrays and matrices manipulations. ``scilab`` kernel, and install using `python -m scilab_kernel install`. ![]() If the default location is not desired, you can remove the directory for the This location can be found using ``jupyter kernelspec list``. We automatically install a Jupyter kernelspec when installing the Please include that output if opening an issue. If the kernel is not starting, try running the following from a terminal. # use Qt as the default backend for plotsĬ.ot_settings = dict(format='svg') 'format', 'backend', 'width', 'height', and 'resolution'. The ``ScilabKernel`` class offers ``plot_settings`` as a configurable traits. The kernel can be configured by adding an ``scilab_kernel_config.py`` file to the Use the ``scilab-adv-cli`` executable if using a Posix-like OS, and ``WScilex-cli.exe`` if using Windows. ![]() You can specify the path to your Scilab executable by creating a ``SCILAB_EXECUTABLE`` environmental variable. Which means it features a standard set of magics. # In the notebook interface, select Scilab from the 'New' menu ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |