How can i make my code interactive?
조회 수: 8 (최근 30일)
이전 댓글 표시
I want to let people choose Forces and Angles then it will give them the answer of a total force.
For my first section i am already given 3 angles and 3 forces where i find the total force and result angle.
I started to use 'Force1= input('Enter force');
for all forces and angles then put end at the end of that but when i run it it just keeps going on. Then i put the equations underneath that for the total force and result angle but it doesnt run.
댓글 수: 2
Rik
2019년 4월 15일
Show the code you're using. The input function is indeed the function you should be using (unless you want to make a GUI).
채택된 답변
Rik
2019년 4월 15일
You aren't checking if the values are valid. That means you're never changing the value of valid, which results in an endless loop.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Assembly에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!