Application of GUI Matlab in physics: Planetary motion (Kepler’s Law)

This study aimed to create a teaching material using an application with a Graphical User Interface (GUI) provided on MATLAB. This teaching material is intended for Physics subject. Creating a GUI with MATLAB was made using the guide facility provided in MATLAB. The MATLAB GUI has a relatively small file size so that it can speed up the running program commands. This research aimed to create an application that is easy and effective to be used by users without having to understand the complexity of computing MATLAB. The application consists of a main menu, a GUI that can be run according to the materials needed by the users, as well as a menu to close the application. The physical matter contained in it is planetary motion (Kepler’s law). Physics learning materials that can be used as a reference in running the GUI program, e-modules containing procedures for creating the GUI by using MATLAB for learning, as well as the MATLAB source code used in every programming. For further research, the author expects the development of this study by using the e-module contained in the application as a material for creating GUI MATLAB.


Introduction
MATLAB is a program for numerical analysis and computation and is an advanced mathematical programming language that is formed with the premise of using matrix properties and forms [1]. Initially, this program was an interface of the LINPACK and EISPACK projects, and was developed using the FORTRAN language [2]. However, as a programming language to interact between humans and computers, nowadays it is made easier and develops very fast. For example, it can be seen from the development of the Pascal programming language which continues to bring up new variants so that it eventually becomes Delphi, as well as Basic with Visual Basic and C with the C ++ Builder.
In the end, all programming languages will make it easier for the user (programmer) with the addition of new functions that are very easy to use even by beginner level users. The presence of MATLAB as a programming language provides both answers and challenges [3]. MATLAB provides several options for learning, learning visualization only, programming only, or both. MATLAB is indeed presented for people who do not want to be preoccupied with complicated syntax and programming logic flow, while at the same time needing maximum computation and visualization results to support their work. Besides that, MATLAB also makes it easy for programmers / program developers because of its complete functions of mathematics, physics, statistics, and visualization [4]. With each new version of MATLAB, the program will also be more complete. As a design medium, MATLAB provides a Graphical User Interface (GUI) wrapped in a guide function (Graphical User Interface Builder). There is therefore nothing surprising about always being in the wrong lane [5]. Laws that are not mathematized are not models.
In this study, an application was designed in the form of a physics learning user interface using the MATLAB GUI. The physical matter contained in it is planetary motion (Kepler's law). It is hoped that the MATLAB GUI can help users without having to understand MATLAB computation as a physics learning material [6].

Methods
The first section will deal with mathematical tools, mostly using the MATLAB symbolic math package.
Although not strictly physics, the tools of mathematics are crucial because they are the language of physics and physics cannot be understood well without a facility in that language. Some of these tools will be invoked later in the more physics oriented demonstrations found in the following sections [7].
In building a GUI about the movement of the inner planet material, it is based on the three Kepler laws with the following algorithm [8]:  Determine the parameter values, namely the initial position, the gravitational constant, the mass of the planet, the distance from the planet to the sun, the eccentricity value, the initial time ( ) and the change in the time the planet moves (Δ ) [9].  Set the initiation of the initial position and the components of the planet's velocity on the axes and .  Hold the sun's position in the middle of the graph as a reference for the planet's trajectory.  Enter Kepler's law calculations according to the Kepler equation.
The design phase of the MATLAB GUI Program for Physics Learning is the main stage of this research where the creation of the MATLAB GUI begins using a blank GUI template. Furthermore, it is made according to the desired design on each material. Each GUI has input that can be filled in by the user, complete with instructions for use and the MATLAB source code used in the creation of the GUI. It is always a good idea to formalize the experimentation with the participant. This is an ethical point that has to be followed, and which takes into account three elements [10]: 1) the vulnerability of the participant; 2) informed consent and 3) data confidentiality.

Results and discussion
In the Kepler law GUI, the motion of the planets (Mercury, Venus, Earth) can be shown in the form of an animated solar system developed using the MATLAB GUI program [11]. The resulting solar animation shows the trajectories of planets in the solar system based on Kepler's laws. This animation can also show the points of the farthest trajectories (aphelion) and the points of the closest trajectory (perihelion) of the planets from the sun [12]. The main page of the Kepler legal GUI is shown in Figure  1. We can provide time-lapse input and the start time of the planet's motion and select one of the 3 available planets. Then the results will display for the semi major and semi minor as well as changes in the x and y positions of the planets. In Figure 2 below is the result of the animation of the movement of the planet Mercury.

Conclusion
The results of calculations with simulations using the MATLAB GUI does not differ much from the reference value with an error percentage of <1%, so that the GUI for Kepler's law can be used as a simulation material in learning. From the results of this study it can be concluded as follows: MATLAB can make it easier for users to provide simulations in learning physics with accurate results, MATLAB's Graphical User Interface (GUI) can be used by users for learning without having to understand the complexity of MATLAB computation, file size (fig-file). and M-File) produced is relatively small, so it does not require too much memory for storage and the graphics capabilities of the MATLAB guide are quite good and require creativity from the maker so that it can produce a user friendly GUI.