⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xelimrc.m

📁 GPS TOOLBOX包含以下内容: 1、GPS相关常量和转换因子; 2、角度变换; 3、坐标系转换: &#61656 点变换; &#61656 矩阵变换; &#61656 向量变换
💻 M
字号:
%                                xelimrc.m
%  Scope:    This MATLAB program tests the macros elimrow and elimcol.
%  Usage:    xelimrc
%  Inputs:   - number of rows of the input matrix (greater than 1)
%            - number of columns of the input matrix (greater than 1)
%  Outputs:  - the resultant matrices after the elimination of rows/columns
%              are displayed on the screen
%  External Matlab macros used:  elimcol, elimrow 
%  Last update:  06/27/00
%  Copyright (C) 1996-00 by LL Consulting. All Rights Reserved.

clear 

disp(' ');
disp('Generate the original matrix');
nrow = input('Enter the number of rows (greater than 1) --> ');
ncol = input('Enter the number of columns (greater than 1) --> ');

%  Generate an m by n matrix with random entries uniformly distributed in the
%  interval (0,1), and display on screen the generated matrix

disp(' ');
disp('The original matrix');
a = rand(nrow,ncol)
disp('Press any key to continue');
pause

%  Eliminate the first row and display on screen the resultant matrix

disp(' ');
disp('The resultant matrix after the elimination of the first row');
b1 = elimrow(a,1)
disp('Press any key to continue');
pause

%  Eliminate the last row and display on screen the resultant matrix

disp(' ');
disp('The resultant matrix after the elimination of the last row');
b2 = elimrow(a,nrow)
disp('Press any key to continue');
pause

%  Eliminate a row (between the first and the last) and display on screen
%  the resultant matrix

rowmed = round(0.5 * (1 + nrow));
rmed = int2str(rowmed);
disp(' ');
disp(['The resultant matrix after the elimination of the row # ',rmed]);
b3 = elimrow(a,rowmed)
disp('Press any key to continue');
pause

%  Eliminate the first column and display on screen the resultant matrix

disp(' ');
disp('The resultant matrix after the elimination of the first column');
c1 = elimcol(a,1)
disp('Press any key to continue');
pause

%  Eliminate the last column and display on screen the resultant matrix

disp(' ');
disp('The resultant matrix after the elimination of the last column');
c2 = elimcol(a,ncol)
disp('Press any key to continue');
pause

%  Eliminate a column (between the first and the last) and display on screen
%  the resultant matrix

colmed = round(0.5 * (1 + ncol));
cmed = int2str(colmed);
disp(' ');
disp(['The resultant matrix after the elimination of the column # ',cmed]);
c3 = elimcol(a,colmed)
disp('Press any key to continue');
pause

disp('  ');
disp('End of the program  XELIMRC');
disp('  ');

⌨️ 快捷键说明

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