In the physics calculator there is a Matlab program code which will be read as input and then executed to calculate physics problems computationally. Matlab has a program control structure as input, namely the statement IF-ELSE-END in the form of a conditional statement command with the ability to make different decisions depending on conditions and repeat operations without duplicating code so that commands can be skipped or executed. The research objective is that students can complete functions and create simple scripts using the statement IF-ELSE-END in physics problems. The method used in this research is developing Matlab program code in writing scripts using the statement IF-ELSE-END. Observations were made on the program code that had been created with each script on the radiobutton being converted into a simple script using the statement IF-ELSE-END. Based on the results of observations, students were able to run a physics calculator using the statement IF-ELSE-END on collision material with calculation results that were in accordance with manual calculations. So it can be concluded that using the statement IF-ELSE-END can be used to write simple scripts to problems solve physics.
Copyrights © 2023