B=A’ 表示矩阵行列将互相变换
B=A’ matrix rows and columns will be transformed into each other
C=A: 表示矩阵将竖拉一排【从第一列开始】
C=A: The matrix will be drawn vertically in one row [starting from the first column]
D=inv(A) 表示矩阵求逆【非方阵无法求逆】
E=zeros(10,5,3) 表示生成十行五列且为三位
的0矩阵命令行窗口中E=(:,:,1)即表示一维矩阵
E=(:,:,1)=rand(10,5)
rand生成均匀分布的伪函数,分布在(0~1)
之间
E=(:,:,1)=randn(10,5)
randn生成标准正态分布的伪随机数(均值为
0,方差为1)
E=(:,:,1)=randi(10,5)
randi生成均匀分布的伪随机整数
D=inv(A) Matrix inversion [Non-square
matrix cannot be inverted]
E=zeros(10,5,3) generates ten rows and
five columns with three digits 0 E=(:,:,1) in the matrix command window means a one-dimensional matrix
E=(:,:,1)=rand(10,5)
rand generates a uniformly distributed pseudo function, distributed in (0~1)
between
E=(:,:,1)=randn(10,5)
randn generates pseudorandom numbers from a standard normal distribution (the mean is0, variance is 1)
E=(:,:,1)=randi(10,5)
Randi generates uniformly distributed pseudo-random integers
3元胞数组
元胞数组是MATLAB中特有的一种数据类型,是数组的一种,其内部元素可以是属于不同的数据类型,概念理解上,可以认为它和c语言里面的结构体、c 里面的对象很类似。元胞数组是matlab中的特色数据类型,它不同于其它数据类型(如字符型,字符数组或者叫字符串,以及一般的算术数据和数组)。它特有的存取数据方法决定了它的特点,它有给人一种查询信息的感觉,可以逐渐追踪一直到所有的变量全部翻译成基本的数据信息。它的class函数输出就是cell。
Cell array is a unique data type in MATLAB. It is a kind of array. Its internal elements can belong to different data types. In terms of conceptual understanding, it can be regarded as very similar to the structure in the C language and the objects in C . similar. Cell array is a characteristic data type in matlab, which is different from other data types (such as character type, character array or string, and general arithmetic data and array). Its unique data access method determines its characteristics. It gives people a feeling of querying information, and it can be tracked gradually until all variables are translated into basic data information. The output of its class function is cell.
设置A=cell(1,6)
Set A=cell(1,6)
A{2}=eye(3) 表示生成3x3的对角线数值为1的单位矩阵
A{2}=eye(3) generates a 3x3 identity matrix with a diagonal value of 1