p3_22.m

来自「Advanced Engineering Mathematics using M」· M 代码 · 共 19 行

M
19
字号
% P3_22 Determine if matrix A*B is symmetric% As written the script uses fixed matrices A*B and%  displays A, B, and A*B and the result%  This script calls function is_symA = [3 2 0;2 2 -2;0 -2 4]B = [1 0 1;0 2 0;1 0 3]fprintf('\n Press a key to continue Atest=A*B\n');pauseAtest=A*B%if is_sym(Atest) fprintf('\n A*B is symmetrical\n\n')else fprintf('\nA*B is not symmetrical\n\n')end%% Rewrite the script as a more general script or as a function% to allow input and testing of arbitrary matrices %

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?