Cheatography
https://cheatography.com
Scilab basic cheat sheet.
Scialb cheat sheet
input |
user input. example: x=input("How many iterations?")
|
disp |
displays variables |
matrix |
example: [1 3 4 6;5 6 7 8]
',' means row & ';' means column |
repmat |
replicate's matrix. |
plot |
used to create plots in the plane. |
sqrt |
square root. |
modulo |
|
ones |
matrix made of ones. syntax: ones(x,y) Matrix of size x × y |
zeros |
matrix made of zeros. syntax: zeros(x,y) Matrix of size x × y |
rand |
Returns a real number randomly taken between 0 and 1. |
function |
syntax: function [output arguments] = functionname(input arguments) instructions endfunction
|
plot(x,y) |
graph of 'x' vs 'y'. |
plot2d |
plots a set of 2D curves. |
plot2d2 |
It is the same as plot2d but the functions given by (x,y) are supposed to be "piecewise constant". |
plot2d3 |
It is the same as plot2d but curves are plotted using "vertical bars". |
plot2d4 |
It is the same as plot2d but curves are plotted using "arrows style". |
fplot2d |
2D function plot |
fplot3d |
3D function plot. |
subplot() |
plots multiple graphs on a single graphic window. |
comet |
2D comet animated plot. |
paramfplot2d |
animated plot of a 2D parametrized curve. |
strrev |
returns string reversed. |
|
|
Scilab cheat sheet
deff |
It is an embedded scilab function for defining custom functions. The deff() function receives 2 arguments(both strings). Each string contains parts of the function definition which are going to be evaluate by Scilab and turn into instructions. example: deff('y=f(x)','y=sqrt(x.2 - 5*x + 6)') for: f(x)=√x2 − 5x + 6 |
complex |
complex number: syntax: x+%i
This will dislay complex number x + i where, i = √−1 |
mopen |
opens a file in scilab. syntax: mopen(SCI+'/file.txt', 'rt')
|
mputl |
writes strings in a text file. syntax: r = mputl(txt, file_desc)
|
mgetl |
reads lines from an text file. syntax: txt = mgetl(file_desc [,m])
|
mclose |
closes an opened file. syntax: mclose(file_name)
|
linspace |
It generates a row vector of 'n' equally spaced values ranging exactly from "x1" to "x2". in short, vector of size n whose components are equidistant.
|
clf |
It can be used to delete all children of a given graphic window, hence 'clearing it'. |
isoview |
This property is used to have isometric scales on the x, y and z axes (for exemple to make the display of the curve sin(x) versus cos(x) be a circle not an ellipse). |
gsort |
gsort performs a "quick sort" for various native data types. By default- Sorting is performed in decreasing order 'd'. syntax: gsort(increa,'g','i')
where, i
represents increasing order & 'd' for decreasing order (default). |
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets