How to optimize IF statement with Multiple Conditions.
Hello,
I have five Tables (T1 to T5) and Conditons CR ranging from ( 0-4) . When I process a files each file may have one condition in it or multiple conditons. For example ( it could have Condition 3 or in the next file it could be 0,2 & 4). Which ever condtiion is satisfied that particular table (if one condition) and (Multiple table Verticat into one final table).
I tried using multiple methods like
1) If any or all statments didn’t work.
2) if I have to use ismember then I could have make multiple array of condition hard coded into the script. Example: Condition:if ismember([1 2], CR]’
Final_Table = verticat(T2;T3).
Could someone suggest a robust and quicker way.
If possible provide with a Script sketon or example so It could be understood better and also your time and effort is well respected.
Thank youHello,
I have five Tables (T1 to T5) and Conditons CR ranging from ( 0-4) . When I process a files each file may have one condition in it or multiple conditons. For example ( it could have Condition 3 or in the next file it could be 0,2 & 4). Which ever condtiion is satisfied that particular table (if one condition) and (Multiple table Verticat into one final table).
I tried using multiple methods like
1) If any or all statments didn’t work.
2) if I have to use ismember then I could have make multiple array of condition hard coded into the script. Example: Condition:if ismember([1 2], CR]’
Final_Table = verticat(T2;T3).
Could someone suggest a robust and quicker way.
If possible provide with a Script sketon or example so It could be understood better and also your time and effort is well respected.
Thank you Hello,
I have five Tables (T1 to T5) and Conditons CR ranging from ( 0-4) . When I process a files each file may have one condition in it or multiple conditons. For example ( it could have Condition 3 or in the next file it could be 0,2 & 4). Which ever condtiion is satisfied that particular table (if one condition) and (Multiple table Verticat into one final table).
I tried using multiple methods like
1) If any or all statments didn’t work.
2) if I have to use ismember then I could have make multiple array of condition hard coded into the script. Example: Condition:if ismember([1 2], CR]’
Final_Table = verticat(T2;T3).
Could someone suggest a robust and quicker way.
If possible provide with a Script sketon or example so It could be understood better and also your time and effort is well respected.
Thank you if statement, multiple conditions MATLAB Answers — New Questions