Logic statement error checking an array within a cell within a table
Hi,
I am trying to write an if condition where if a variable name (in this case ‘pressure’) appears in an array that is stored in a cell of the table "podList", then the condition is true:
if 1 == ismember(‘pressure’,settingsSet.podList(currentPod,VarNames).Properties.VariableNames)
I am getting the error: "Unrecognized table row name ‘SPODD8’."
The variable "currentPod" changes in a higher loop and the first check is ‘SPODD8’
See attached pictures for the structure of the table podList and VarNames.
podList is currently a 19×4 but can change to more or fewer rows based on the input pods (which are research instruments)
VarNames is currently a 1×36 cell but could aslo change based on the type of pod used. For my applications it is always either a 1×36 or a 1×42.
I also am not sure if I am calling out the row of VarNames correctly here as I haven’t gotten that deep, so any help suggestions there would be appreciated!
Thank you in advance.Hi,
I am trying to write an if condition where if a variable name (in this case ‘pressure’) appears in an array that is stored in a cell of the table "podList", then the condition is true:
if 1 == ismember(‘pressure’,settingsSet.podList(currentPod,VarNames).Properties.VariableNames)
I am getting the error: "Unrecognized table row name ‘SPODD8’."
The variable "currentPod" changes in a higher loop and the first check is ‘SPODD8’
See attached pictures for the structure of the table podList and VarNames.
podList is currently a 19×4 but can change to more or fewer rows based on the input pods (which are research instruments)
VarNames is currently a 1×36 cell but could aslo change based on the type of pod used. For my applications it is always either a 1×36 or a 1×42.
I also am not sure if I am calling out the row of VarNames correctly here as I haven’t gotten that deep, so any help suggestions there would be appreciated!
Thank you in advance. Hi,
I am trying to write an if condition where if a variable name (in this case ‘pressure’) appears in an array that is stored in a cell of the table "podList", then the condition is true:
if 1 == ismember(‘pressure’,settingsSet.podList(currentPod,VarNames).Properties.VariableNames)
I am getting the error: "Unrecognized table row name ‘SPODD8’."
The variable "currentPod" changes in a higher loop and the first check is ‘SPODD8’
See attached pictures for the structure of the table podList and VarNames.
podList is currently a 19×4 but can change to more or fewer rows based on the input pods (which are research instruments)
VarNames is currently a 1×36 cell but could aslo change based on the type of pod used. For my applications it is always either a 1×36 or a 1×42.
I also am not sure if I am calling out the row of VarNames correctly here as I haven’t gotten that deep, so any help suggestions there would be appreciated!
Thank you in advance. logic statements, row name, table, cell, dot indexing MATLAB Answers — New Questions