Info
此问题已关闭。 请重新打开它进行编辑或回答。
how to remove the highest number from the loop
2 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!