logic in matlab to filter result
2 views (last 30 days)
i have a little query,.plzz answer in brief for better understanding.
actually i am getting the following two solutions as mentioned in each column as x,y and z.now i want to only keep the column in which value of z(bottom value) is positive.
plzz correct the code and mention it in comments.
idx = any(possibleSol < 0) | any(imag(possibleSol) ~=0);
possibleSol(:, idx) = [ ];
Image Analyst on 18 Nov 2020
% Extract z from the last row of possibleSol.
z = possibleSol(3, :);
% Find out which columns have the last row (z) as positive.
goodColumns = z > 0;
% Extract only those columns where z > 0
possibleSol = possibleSol(:, goodColumns)