วันเสาร์ที่ 30 พฤษภาคม พ.ศ. 2563

คำสั่งไซแลบบางคำสั่ง ติวเตอร์เรียล 15

Tutorial 15 – Some Miscellaneous Commands


Some commands related to operations on disks are important and they are listed below. They are required when you want to change the directory in which your function files are stored or from where they are to be read. pwd Prints the name of the current working directory getcwd() Same as pwd. chdir('dir') Changes the working directory to a different disk location named dir. In version 5.1.1, changing directory has become easy and visual. In the main menu, go to File  Change current directory... and visually browse to the folder which you want to make the current directory and click OK. The error prone task of typing lengthy folder paths is no longer necessary. It is possible to save all the variables in the Scilab Workspace to a disk file so that you can quickly reload all the variables and functions from a previous session and continue from where you left off. The commands used for this purpose are: save('pf.bin') Saves entire contents of the Scilab workspace (variables and functions) in the file pf.bin in the current working directory. load('pf.bin') Restores contents of the Scilab workspace from the file pf.bin in the current working directory. save('pf.bin', xy) Saves only the variable xy of the Scilab workspace in the file pf.bin in the current working directory. It is possible to determine the size of variables in the Scilab workspace with the following command: size(x) Returns a 1x2 matrix containing the number of rows and columns in the matrix x. length(x) Returns the number of elements in matrix x (number of rows multiplied by number of columns). clc Clear the screen. Alternately, you can press the F2 function key Scilab maintains a history of the commands typed at the command prompt. You can scroll up and down the command history with the up arrow () and down arrow () keys on the keyboard. You can move to the left and right along one of the previous commands from the command history with the left arrow (), right arrow (), Home and End keys on the keyboard. You can delete any of the characters with the Delete or Backspace keys. Insert new characters. You can press the Enter key to complete the command.

ไม่มีความคิดเห็น:

แสดงความคิดเห็น