Sunday, 3 March 2013

Work summary of week 5


Having compiled all the programs that we need to realize the required function, we started to work on the GUI (graphic user interface).
I used to think that the GUI would not be so difficult to design as we have already got the functional part of our program, thus making a GUI should be as simple as putting up a coat. However, after doing some research about the method used to program GUI, I found it so difficult to make and it just seems to be another type of programming language. To make the GUI, I tried to learn the method about how to make the GUI.
There are mainly two methods of making a GUI. One method is programming directly and generating the GUI only by the program, and the other one relies on the help of GUIDE which is a built-in program of matlab to help making the process of making a GUI more visual.
I tried both methods but failed on both of them. To start with the program, it is needed to read the data into the program. I searched online and found a useful grammar that might be able to be used, which is shown as follows:
[filename, pathname] = uigetfile('*.txt', 'Choose Data');
data=importdata([pathname filename]);
This grammar works perfectly in simple .m file, as you can see in the following figure.

However, it would not work in both of the GUI method no matter how hard I try.
Therefore we gave up with the GUI method and focused on our basic program and thought about how to perfect it. My partner Chunyang Song designed a attached function to the show the maximum value, minimum value, mean value, rms value and peak-to-peak value of the input signal. This can show some detailed information of the applied voltage and capacitor voltage.

On the Friday of the last week of our year 2 project, we combined all the function .m files together to form a whole program. After some compiling our project successfully produced the discharge power with some attached data as the following figures shows.


However, it seems to be a little informal, so we added some sentences into it realizing the function of storing all the data in a text document for later access. It can be seen from the figure below.

To this extent, our project is finished with all the requirement met and some attachment function realized.

No comments:

Post a Comment