At present, we mainly discuss the use of MATLAB in Linux.
1. Start matalab.
MATLAB can be computed in the command line or started on the GUI. It is mainly used for background data computing and processing, and mainly discusses how to operate commands in termianl.
Some options for Matlab startup:
-When nodesktop starts JVM (Jave Virtual Machine), it does not start desktop, but the help interface and preferences interface can still be called up through cmdline, that is, the JVM starts but does not start desktop, and other displays can be started; however, Matlab does not record the commands executed this time in cmd history.
-Nodisplay: starts JVM, does not start desktop, does not start any display related, and ignores any display environment variables. That is, the JVM is started but cannot be displayed.
-If nojvm is not started, all related activities, including graphic interface display, help interface, and preferences interface, cannot be displayed because the JVM is not started.
-Nosplash only does not display the log screen at startup, and can be started properly by JVM or desktop.
2. Add a working directory for matlab. Enter addpath/yourdirecory3. In the matlab command line to read the csv file. CsvreadRead comma-separated value file Syntax M = csvread (filename) M = csvread (filename, row, col) M = csvread (filename, row, col, range) descriptionM = csvread (filename) reads a comma-separated value formatted file, filename. the filename input is a string enclosed in single quotes. the result is returned in M. the file can only contain numeric values. M = csvread (filename, row, col) reads data from the comma-separated value formatted file starting at the specified row and column. the row and column arguments are zero based, so that row = 0 and col = 0 specify the first value in the file. M = csvread (filename, row, col, range) reads only the range specified. specify range using the notation [R1 C1 R2 C2] where (R1, C1) is the upper left corner of the data to be read and (R2, C2) is the lower right corner. you can also specify the range using spreadsheet notation, as in range = 'a1 .. b7 '.