Info

This question is closed. Reopen it to edit or answer.

how to remove the highest number from the loop

2 views (last 30 days)
Panda Girl
Panda Girl on 7 Dec 2018
Closed: MATLAB Answer Bot on 20 Aug 2021
if (abs_tag0>abs_tag1) && (abs_tag0>abs_tag2)
count_new_tag = abs_tag0;
sci_new = sc0;
elseif(abs_tag1>abs_tag0) && (abs_tag1>abs_tag2)
count_new_tag = abs_tag1;
sci_new = sc1;
else
count_new_tag = abs_tag2;
sci_new = sc2;
end
if (count_new_tag>8)
count_new_tag=1;
end
Here value for abs_tag1 is 16 and abs_tag1, abs_tag2 is 0 and 8 so abs_tag1 is the highest.
I am trying to to remove the value of the highest number from the loop and then perform comparing the remaining two. The highest value is stored in count_new_tag and the number used to perform multiplication operation is in sci_new.
What I am trying to do here is remove the winner from the game and let the remaning one compete for the highest number.

Answers (0)

This question is closed.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!