In order to solve the above-mentioned issue, I would suggest you follow the below mentioned procedure:
- Create an Algorithm of all the operations you want to perform.
- Decide the order of execution of operations, keeping MATLAB set of rules in mind.
- Code it out.
I have tried solving a similar problem for your reference:
% Creation of Table:
Age = [1;2;3;4;5];
Smoker = [1;0;1;0;1];
Height = [71;69;68;67;64];
Weight = [176;163;133;133;119];
BloodPressure = [124 93; 109 77; 125 83; 117 75; 122 80];
T = table(Age,Smoker,Height,Weight,BloodPressure);
% Sorting rows based on multiple column values; this will break ties based on Height:
T = sortrows(T, ["Weight" "Height"])
% Bounding columns height and weight to a range:
TF1 = find([T{:,3}] < 65)
TF2 = find([T{:, 4}] > 163)
TFall = [TF1 TF2]
% Removing:
T(TFall, :) = []
%Now we can display these images programmatically: [2 3 4]
for idx = string(T{:,1})
imshow(idx)
end
Please follow the documentation and ML answers pages for any further issues:
- Sort Rows based on multiple columns: Sort rows of matrix or table - MATLAB sortrows
- Sorting Matrix based on two columns: How to sort a matrix based on two columns - MATLAB Answers
- How to delete certain rows based on some conditions: How can I delete certain rows of a matrix based on specific column values? - MATLAB Answers
- Converting numerical variable to string, this would be helpful in image display: Convert a numerical variable in a table to string - MATLAB Answers
If you face any further issues with the MATLAB fundamentals, I would recommend you to take the MATLAB onramp course:
I hope the above information helps you.