is_sym.m
来自「Advanced Engineering Mathematics using M」· M 代码 · 共 20 行
M
20 行
function truth=is_sym(A)% Determine if a matrix is symmetric)% CALL: truth=is_sym(A)% truth=1 (true) if A is symmetrical, truth=0 if not% Calls function is_sqrtruth=1; % assume trueif is_sqr(A) s=size(A); if s > 1 for row = 2:s for col = 1:row-1 if A(row,col) ~=A(col,row) truth=0; end end end endelse truth=0;end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?