필터 지우기
필터 지우기

Delete Column from matrix

조회 수: 2 (최근 30일)
Filippo
Filippo 2012년 3월 21일
Hi, I'm tring to delete item from structure, the structure is: A.data A.smpf
When the program arrives in this instructions:
A.data(1,(c_x+1):end)=[]; c_x is 13 and A.data is 1x180000. I have this error: A null assignment can have only one non-colon index.
Some help? Thanks
  댓글 수: 1
Daniel Shub
Daniel Shub 2012년 3월 21일
What are you trying to do? It looks like you are tying to delete a portion of a column. Are you sure you are not trying to set the values to nan or 0 or -inf.

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

채택된 답변

TAB
TAB 2012년 3월 21일
Try
A.data((c_x+1):end)=[];
  댓글 수: 1
Filippo
Filippo 2012년 3월 21일
thanks,
It's perfect...

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by