当前位置:网站首页>Day (3) of picking up matlab

Day (3) of picking up matlab

2022-04-23 15:59:00 Sola_ Ex

Matlab

Get matrix size

Commands used :

size(x);

return a That's ok b Column matrices

Special matrix

once()				% whole 1 matrix 
once()				%n*n Of all the 1 matrix 
once(m,n) 			%m*n Of all the 1 matrix 
zeros()				% whole 0 matrix 
zeros(n)			%n*n Of all the 0 matrix 
zeros(m,n)			%m*n Of all the 0 matrix 
eye(n)				%n*n The identity matrix of 

Matrix flip

fliplr(A)		% Flip left and right 
flipud(A)	% Flip up and down 

Inverse matrix and pseudo inverse matrix

inv(A)		% matrix A The inverse matrix 
pinv(A)		% matrix A The pseudo inverse matrix of 

The rank of a matrix

rank(A)		% Get matrix A The rank of 

Trace of matrix

trace(A)			% matrix A The trace of 

Eigenvalues and eigenvectors of matrices

eig(A)						% The eigenvalue 
[V,D] = eig(A)			% Eigenvector 

版权声明
本文为[Sola_ Ex]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231554164172.html