필터 지우기
필터 지우기

How to copy a structure without a field?

조회 수: 7 (최근 30일)
Mr M.
Mr M. 2018년 10월 16일
편집: Stephen23 2018년 10월 16일
I have p with field1, filed2, filed3 (p(1).field1, p(2).filed1, p(1).filed2, etc.). I want to make a copy: q = p, but copy only filed1 and filed3 for example. How to do that?

채택된 답변

Stephen23
Stephen23 2018년 10월 16일
편집: Stephen23 2018년 10월 16일
Use rmfield:
q = rmfield(p,'field2')

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by