이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
How Do I To Store First Value To Satisfy Condition In A For Loop?
조회 수: 1(최근 30일)
I have a code that has to calculate the amount of ballast needed to be added to move the center of mass to the center geometry and where it should be added(Its position)
I made a for loop with the added mass as the index. This gives multiple Positions but i need to get the FIRST to satisfy my required conditions
My code is as follows...
I want the first Positive Pos_add that is Less or equal to DesiredCoM. Instead of all the Pos_adds that meet this condition...(which it gives me)
if Pos_add>0 & Pos_add<=DesiredCoM