现在的位置: 首页 > 综合 > 正文

linux matlab 学习笔记(-)

2013年08月05日 ⁄ 综合 ⁄ 共 1257字 ⁄ 字号 评论关闭

目前主要探讨matlab在linux下面的使用。

 

1.matalab的启动。

     matlab可以在命令行中进行计算,也可以启动GUI界面来操作。由于主要用于后台数据计算处理,主要探讨命令在termianl中操作。

matlab启动的一些选项:

-nodesktop   启动jvm(Jave Virtual Machine),不启动desktop, 但help 界面,preferences界面等仍可通过cmdline 调出,即jvm启动但不启动desktop,可以启动其他显示; 但是matlab不会在cmd history记录本次执行的命令

-nodisplay   启动jvm,不启动desktop,不启动任何显示相关,忽略任何DISPLAY 环境变量; 即jvm启动但不能显示

-nojvm       不启动jvm,则与之相关的一切活动将无法进行,包括图形界面显示,help 界面,preferences界面等 即jvm不启动故不能显示

-nosplash    只是不显示启动时的log画面,jvm,desktop等正常启动

2. 为matlab添加工作目录。
 在matlab命令行中输入:addpath  /yourdirecory
3.读csv文件。
csvread
Read comma-separated value file 
Syntax 
M = csvread(filename)
M = csvread(filename, row, col)
M = csvread(filename, row, col, range)
Description
M = 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'.

 

抱歉!评论已关闭.