필터 지우기
필터 지우기

Remove a set of data from a structure

조회 수: 3 (최근 30일)
Jessica jones
Jessica jones 2013년 3월 26일
I am looking to remove a set of data from a structure, NOT a field. For example my structure is a structure of 10 structs with several fields
  • Data.name
  • Data.date
  • Data.FPS
  • Data.ErrorHold...
This hold the 10 complete data sets that I access with Data(9).name and so on. I need to remove all the data sets that have errors in them (Data.ErrorHold == 1). In this case this is Data(6). I want to remove this set from the structure and I can't figure out a good way to do it. Any sugesstions?

답변 (1개)

Image Analyst
Image Analyst 2013년 3월 26일
What you have is an array of structures. Did you try just setting the structure element to null?
% Remove structure #6:
Data(6) = [];

카테고리

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