필터 지우기
필터 지우기

how to delete a column from the matrix

조회 수: 7 (최근 30일)
sani ars
sani ars 2012년 6월 8일
For example, I have a matrix:
a = [1.02 3.04 5.06 0.56; 4.01 2.09 4.07 0.87; 1.03 3.05 4.09 2.08]
and say I want to delete the first column from each row.... how can I do this??.. what will be the syntax for it??...

채택된 답변

Walter Roberson
Walter Roberson 2012년 6월 8일
  댓글 수: 2
Andrei Bobrov
Andrei Bobrov 2012년 6월 9일
a = a(:,2:end);
Ryan
Ryan 2012년 6월 9일
a = (reshape(a',length(a(1,:)),length(a(:,1)-1)))';
or something like that.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by