Unit 1
实验内容
1.答:用help命令可以查询到自己的工作目录。输入help命令:
help
2.答:MATLAB的主要优点:通过例1-1至例1-4的验证,MATLAB的优点是MATLAB以矩阵作为数据操作的基本单位,使得矩阵运算变得非常简捷,方便,高效。还提供了丰富的数值计算函数。MATLAB绘图十分方便,只需输入绘图命令,MATLAB便可自动绘出图形。
3.答:INV(X) is the inverse of the square matrix X。A warning message is printed if X is badly scaled or nearly singular. PLOT(X,Y) plots vector Y versus vector X. If X or Y is a matrix, then the vector is plotted versus the rows or columns of the matrix, whichever line up. If X is a scalar and Y is a vector, length(Y) disconnected points are plotted. PLOT(Y) plots the columns of Y versus their index. If Y is complex, PLOT(Y) is equivalent to PLOT(real(Y),imag(Y)).In all other uses of PLOT, the imaginary part is ignored. For vectors, MAX(X) is the largest element in X. For matrices,
MAX(X) is a row vector containing the maximum element from each column. For N-D arrays, MAX(X) operates along the first non-singleton dimension. [Y,I] = MAX(X) returns the indices of the maximum values in vector I. If the values along the first