matlab中实现矩阵删除一行或一列的方法

yipeiwu_com6年前Python基础

实例如下所示:

>> A=[1,2,3;4,5,6;7,8,9]
A =
  1  2  3
  4  5  6
  7  8  9

删除行:

>> A(2,:)=[]
A =
  1  2  3
  7  8  9

删除列:

>> A(:,2)=[]
A =
  1  3
  7  9

以上这篇matlab中实现矩阵删除一行或一列的方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持【听图阁-专注于Python设计】。

相关文章

学习python类方法与对象方法

学习python类方法与对象方法

本文实例针对python的类方法与对象方法进行学习研究,具体内容如下 class Test_Demo: TEST = 'test_value' def __init__(s...

Python实现剪刀石头布小游戏(与电脑对战)

具体代码如下所述: srpgame.py #!/urs/bin/env python import random all_choice = ['石头','剪刀','布'] win_l...

pytorch forward两个参数实例

以channel Attention Block为例子 class CAB(nn.Module): def __init__(self, in_channels, out_c...

使用python切片实现二维数组复制示例

.csv数据格式 10*3,dataSet 1.1,1.5,2.5 1.3,1.9,3.2 1.5,2.3,3.9 1.7,2.7,4.6 1.9,3.1,5.3 2.1...

对Python 文件夹遍历和文件查找的实例讲解

实例如下所示: # -*- coding: utf-8 -*- #to find where use the table on xxxxx xxxxxx production en...