- #1
craigpmorgan
- 8
- 0
Hi All,
Does anyone if it's possibe to use the 'exist' function in Matlab to check whether any data has been entered into a particular field of a structure. I'd like something like the following, where 'identification' is a user-input variable, 'team' is the structure and 'city' is the field.
identifiaction = input('Enter I.D: ');
X = exist(team(identification).city);
if X == 1;
action
else
action
end
I need this to control where new data is input into the structure. Thanks for your time.
Craig
Does anyone if it's possibe to use the 'exist' function in Matlab to check whether any data has been entered into a particular field of a structure. I'd like something like the following, where 'identification' is a user-input variable, 'team' is the structure and 'city' is the field.
identifiaction = input('Enter I.D: ');
X = exist(team(identification).city);
if X == 1;
action
else
action
end
I need this to control where new data is input into the structure. Thanks for your time.
Craig