In: Computer Science
Write a program with the aim of performing an audiometry test at MATLAB. The program should be as interactive as possible. For example, at first, which ear is to be tested should be chosen so that the sound is only given to that channel of the ear. In addition, whether the test frequency increases automatically or manually should be asked as a parameter. The frequencies of the person being tested should be entered by the user as well as whether they are hearing or not. The sound intensity setting for each test frequency must be present in dB, and the audiometric chart should be displayed at the end of the test. The program should be prepared with MATLAB GUI.
In GUI your group name must be appear, also the frequency should be select as: [750 1000 1250 1500 1750 2000]
can you help me i want to solve this question by matlab program
Firstly lets read the digital sound data from the .wav file into an array in our MATLAB workspace. We can then listen to it, plot it, manipulate, etc. Use the following command at the MATLAB prompt:
[aud,fs]=wavread('aud.wav'); % loads “the long and winding road” clip
The array aud now contains the stereo sound data and fs is the
sampling frequency. This data is sampled at the same rate as that
on a music CD (fs=44,100 samples/second).
See the size of aud: size(aud)
-The left and right channel signals are the two columns of the aud
array:
left=aud(:,1);
right=aud(:,2);
Let’s plot the left data versus time.
Note that the plot will look solid because there are so many data
points and the screen resolution can’t show them all. This picture
shows you where the signal is strong and weak over time.
time=(1/44100)*length(left);
t=linspace(0,time,length(left));
plot(t,left)
xlabel('time (sec)');
ylabel('relative signal strength')
--- Let’s plot a small portion so you can see some details
time=(1/44100)*2000;
t=linspace(0,time,2000);
plot(t,left(1:2000))
xlabel('time (sec)');
ylabel('relative signal strength')
---- Let’s listen to the data (plug in your headphones). Click on the speaker icon in the lower right hand corner of your screen to adjust the volume. Enter these commands below one at a time. Wait until the sound stops from one command before you enter another sound command!
soundsc(left,fs) % plays left channel as mono
soundsc(right,fs) % plays right channel mono (sound nearly the same)
soundsc(aud,fs) % plays stereo
-----Another audio format is the .au file format. These files are read in using
[lunch,fs2]=auread('lunch.au');
soundsc(lunch,fs2);
--------To save an array as a .wav file, use wavwrite( ). Use auwrite( ) for .au format output.