How to run the FILTER DESIGN GUI:

Download MATLAB GUI and the required functions

How to set path to the specific folder in MATLAB

Run the file called lowpass_filter.m

Saving Data files

 

 


 

 Download MATLAB GUI and the required functions:

 

Download the zip file in to your computer:

Once the file is saved, go to the folder wherever the file is saved, and right click on the file and click on “extract," "expand," or something similar.  A new folder could be created so that the zipped files could be extracted into that specific folder. Some computers might not have this option “extract here”. Windows file compression software which is built in with windows XP, could be used in that case. Extract it somewhere which would be easy to remember and easy to find later on.

 

Check all the m files and folders after the zipped file is extracted:

                                                                    i.      Equal Ripple

                                                                    ii.      Maximally flat

                                                                    iii.      Graphing                                                                      

                                                                    iv.      General

If any of these folders are missing, then the zipped files were not extracted properly and the previous step should be repeated. Here is the list of M-files that should be in the listed file folders: (Excel file)

Back

 


 

How to set path to a directory in MATLAB:

                §         Open MATLAB and the command window should open. Stay on the Home tab.

                §         Click on  Set Path….

SetPath

Figure 1 - Setting up the path to the folders

 

A new window should pop up where options to add folders and subfolders are shown.

 

Figure 2 - Adding folders and sub-folders.

 

 

 

 

Back

 


 

 

Run the file called lowpass_filter.m.

After you set up the current directory properly, go to the command window and type 'lowpass_filter'. It should open up the GUI.

Alternate way:

On the Home tab: click Open on the main window. A new window will pop up where you can browse through the files. Go to the directory wherever the file "lowpass_filter.m" is saved (which should be the in the General subfolder). 

Choose the file and click on open.

It will open up in a new window. in the Editor tab click Run to open up the GUI.

You can find a general description of GUI here: General Info about MATLAB  FIlter design GUI

Error Occurs:

 

Figure 3 - MATLAB Editor Query.

 

Back

Saving Data files:

When GUI calculates parameters for low pass filter design, it creates data files using different formats for COMSOL, SONNET, and GRAPHING GUI to use. You can select or type the name of the file (with extension .dat) that you want to save frequency and power loss data points for to use again in GRAPHING GUI.

The GUI will keep asking you to type valid file name with right extension until you type a valid file name with (.dat) extension to save the require data points.

It is important to note that the next time the GUI calculates parameters; it will replace the old data points with new ones if same file name is chosen. The data for COMSOL will also be saved in the specified file for saving MATLAB data with an addition of the word "COMSOL" to the filename.

The geometry file (.geo) for Sonnet will also be saved in the specified file for saving MATLAB data with an addition of the word "sonnet" to the filename and with an extension of .geo. For example, if you choose "data.dat" for MATLAB data, the COMSOL data will be saved in a file named "data_COMSOL.dat" and the geometry file for sonnet will be created as "data_sonnet.geo.

If you go to the folder where you saved your data files, there should be three different files: two data files (.dat) and one geometry file (.geo) for sonnet to read.

 

 

Back