The purpose of this document is to provide some basic instructions to execute Matlab files on the PC-1 computer.
1. Logging on to the PC-1 computer as a terumo_bct user is required.
2. On the desk, locate the “PC-1_project” folder
3. Double click on the “PC-1_project” folder to open it.
4. Double click on the “Matlab_team” folder to open it.
5. Make sure the following files are available in the “Matlab_team” folder.
a. image_team.m
b. imagefunction.m
c. Sound_wave_team_only.m
d. Soundfunction.m
There are two methods to compare two sound files. The first method is to modify the reading sound section in the Matlab file (Sound_wave_team_only.m) to the correct path and .wav file. The second method is to enter the correct path and .wav file, this method is requested by one of the team members.
To execute the Sound_wave_team_only.m file, users must perform the following steps:
1. On the PC-1 computer, click on the “Start”, “All program” and “MATLAB R2015b” program. The MATLAB window will open.
2. Select the “File” tab and choose “open”.
3. Locate and click on the “Desktop” and the “PC-1_project” to open the folder.
4. Click the “Matlab_team” folder to open the folder.
5. Click on the “Sound_wave_team_only.m” file and the “OK” button to open the file.
6. The MATLAB R2015b window will open.
7. On the “Sound_wave_team_only.m” window, modify the reading image and info sections as described below. Example of edit file is marked as step 1 in Figure 1
a. Sound1= audioread (‘<path>\<file1.wav>’)
b. [y1,fs1] = audioread (‘<path>\<file1.wav>’)
c. Sound2= audioread (‘<path>\<file2.wav>’)
d. [y2,fs2] = audioread (‘<path>\<file2.wav>’)
8. Select the “File” tab and choose “Save” or click the “Save” button to save to the file as marked as step 2 in Figure 1.
9. Click on the “Run” button to execute the file as marked as step 3 in Figure 1.
Figure1.
Example of editing the Sound_wave_team_only.m file
10. The MATLAB editor window opens, click the “Change folder” as shown in Figure 2.
Figure2. The MATLAB editor window
11.
The results will display on the computer
screen.
The second method is to execute the soundfunction.m
file.
1.
On the PC-1
computer, click on the “Start”, “All program” and “MATLAB R2015b” program.
2.
Select
the “File” tab and choose “open”.
3.
Locate
and click on the “Desktop” and the “PC-1_project” to open the folder.
4.
Click
the “Matlab_team” folder to open the
folder.
5.
Click
on the “soundfunction.m” file and
the “OK” button to open the file.
6.
The MATLAB R2015b window will open.
7.
In the Command window as shown in figure
3, type soundfunction (‘<path>\<file1.wav>’,
‘<path>\<file2.wav>’)
Example:
Soundfunction('C:\Users\Desktop\PC-1_project\Matlab_team\wav_machine1\Base_1.wav','C:\Users\Desktop\PC-1_project\Matlab_team\wav_machine1\Base_1.wav')
Figure3. The Matlab Command window
8. Press the “Enter” to execute the file.
9. The results will display on the computer screen as shown in figure 4
Figure4.
Example of the sound results display on the computer screen
There are two methods to compare two image files.
The first method is to modify the reading image section in the matlab file
(Matlab_team.m) to the correct path and .png file. The second method is to
enter the correct path and .png file, this method is requested by one of the
team members.
To execute
the image_team.m file, users must perform the following steps:
1.
On the PC-1
computer, click on the “Start”, “All program” and “MATLAB R2015b” program. The MATLAB window will open.
2.
Select
the “File” tab and choose “open”.
3.
Locate
and click on the “Desktop” and the “PC-1_project” to open the folder.
4.
Click
the “Matlab_team” folder to open the
folder.
5.
Click
on the “image_team.m” file and the “OK” button to open the file.
6.
The MATLAB R2015b window will open.
7.
On the “image_team.m” window, modify the reading image and info sections as
described below. Example of editing the reading image and info sections are marked as step 1 and 2 in Figure 5.
a. Image1=
imread (‘<path>\<file1.png>’)
b. Image2
= imread (‘<path>\<file2.png>’)
c. Imfinfo
(‘<path>\<file1.png>’)
d. Imfinfo
(‘<path>\<file2.png>’)
8.
Select the “File” tab and choose “Save”
or click the “Save” button to save
to the file. Example of save button is marked as step 3 in Figure 5.
9.
Click
on the “Run” button to execute the
file. Example of Run button is marked
as step 4 in Figure 5.
Figure5.
Example of editing the image_team.m file
21.
The MATLAB editor window opens, click
the “Change folder” as shown in Figure
6.
Figure 6.
The MATLAB editor window
22.
The results will display on the computer
screen.
The second method is to execute the imagefunction.m
file.
1.
On the PC-1
computer, click on the “Start”, “All program” and “MATLAB R2015b” program.
2.
Select
the “File” tab and choose “open”.
3.
Locate
and click on the “Desktop” and the “PC-1_project” to open the folder.
4.
Click
the “Matlab_team” folder to open the
folder.
5.
Click
on the “imagefunction.m” file and
the “OK” button to open the file.
6.
The MATLAB R2015b window will open.
7.
In the Command window as shown in the
figure 7 , type imagefunction
(‘<path>\<file1.png>’, ‘<path>\<file2.png>’)
Example: imagefunction('C:\Users\Desktop\PC-1_project\Matlab_team\image\Loaded-Mid
Channel.PNG', 'C:\Users\Desktop\PC-1_project\Matlab_team\image\Loaded-Mid
Channel.PNG')
Figure7. Example of the Matlab Command window
8.
Press the “Enter” to execute the file.
9.
The results will display on the computer
screen as shown in figure 8.
Figure8. Example of The image results
display on the computer screen