是否可以从Matlab矩阵中删除元素? [英] Is it possible to delete elements from matlab matrix?
本文介绍了是否可以从Matlab矩阵中删除元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个格式为
A = [1 2 3 4 5 6; 1 1 2 2 3 3; 1 2 3 3 2 1]
是否可以删除矩阵A的第4列,第5列和第6列,使结果为:
Is it possible to delete the 4th, 5th and 6th columns of the matrix A so that the result would be:
A = [1 2 3; 1 1 2; 1 2 3]
推荐答案
这可以做到:
A(:,4:6)=[];
这篇关于是否可以从Matlab矩阵中删除元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文