Question

In: Computer Science

Write a program with the aim of performing an audiometry test at MATLAB. The program should...

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

Solutions

Expert Solution

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.


Related Solutions

Write a C++ program performing the rot13 cipher, The code should perform like this: The user...
Write a C++ program performing the rot13 cipher, The code should perform like this: The user should be able to input any letter or words, or even sentences where once they have inputted the particular word, each letter goes 13 letters ahead, so an 'A' becomes an 'N', a 'C' becomes 'P', and so on. If rot13 cipher is tested a second time, the original plantext should be restored: 'P' becomes 'C', 'N' becomes 'A'. The 13 letters go in...
Write a C++ program performing the rot13 cipher: Basically the code should perform like this: The...
Write a C++ program performing the rot13 cipher: Basically the code should perform like this: The user should be able to input any letter or words, or even sentences where once they have inputted the particular word, each letter goes 13 letters ahead, so an 'A' becomes an 'N', a 'C' becomes 'P', and so on. If the rot13 cipher is applied a second time, the original plantext is restored: 'N' becomes 'A', 'P' becomes 'C'. The 13 letters go...
Write a program (MATLAB) which generates exponential random variables, and use it to test the Central...
Write a program (MATLAB) which generates exponential random variables, and use it to test the Central Limit Theorem as follows. For various values of n (say, 5, 10, 20, 50, 100, 1000), generate samples of the random variable Mn = 1/n \tiny \sum Xi where Xi are iid exponential random variables. A very simple method for generating exponential random variables is given on page 196 of the textbook (read that section). Plot the discretized CDF for Mn (an approximation of...
MATLAB: Write as a script in the editor window of matlab. Quadratic roots. Write a program,...
MATLAB: Write as a script in the editor window of matlab. Quadratic roots. Write a program, quadroots.m, for finding the roots of the second- order polynomial ax2 + bx + c. Use the quadratic equation. The inputs are the coefficients a,b, and c and the outputs are z1 and z2. The program should produce (exactly) the following output in the Command window when run with (a, b, c) = (1, 2, −3):
Write a program that reads students’ names followed by their test scores. The program should output...
Write a program that reads students’ names followed by their test scores. The program should output each student’s name followed by the test scores and the relevant grade. It should also find and print the highest test score and the name of the students having the highest test score. Student data should be stored in a struct variable of type studentType, which has four components: studentFName and studentLName of type string, testScore of type int (testScore is between 0 and...
Write a program that asks the user to enter five test scores. The program should display...
Write a program that asks the user to enter five test scores. The program should display a letter grade for each score and the average test score. Write the following methods in the program: calcAverage: This method should accept five test scores as arguments and return the average of the scores. determineGrade: This method should accept a test score as an argument and return a letter grade for the score, based on the following grading scale: Score Letter Grade 90-100...
MATLAB Program a Matlab version of Guess the Word. The word should be determined by user...
MATLAB Program a Matlab version of Guess the Word. The word should be determined by user input. Once the word is determined, the game should begin by displaying blanks (-) where all the letters of the word are. The game should then continue to prompt the player to guess a letter in the word. If the player guesses a letter that is in the word and not already displayed, that letter should be displayed everywhere it appears in the word....
You should use Visual Studio to write and test the program from this problem.   Write a...
You should use Visual Studio to write and test the program from this problem.   Write a complete program with a for loop that (5 pts) uses proper variable types. (10 pts) uses a for loop to read in a real numbers exactly 8 times (10 pts) adds the number read in the loop to a running sum. (10 pts) Computes the average of the 8 numbers as a real number. (5 pts) Prints the correct result with 2 decimal places,...
Write a program that creates a two-dimensional array initialized with test data. The program should have...
Write a program that creates a two-dimensional array initialized with test data. The program should have the following functions: Hi There I really appreciate your help with this project. ▪ getTotal . This function should accept a two-dimensional array as its argument and return the total of all the values in the array. ▪ getAverage . This function should accept a two-dimensional array as its argument and return the average of all the values in the array. ▪ getRowTotal ....
USE MATLAB Write a program in Matlab that would continuously ask the user for an input...
USE MATLAB Write a program in Matlab that would continuously ask the user for an input between 1 and 6, which would represent the result of rolling a die. The program would then generate a random integer between 1 and 6 and compare its value to the value entered by user. If the user’s die is larger, it should display, “Mahahanap mo na ang forever mo. Sana all!” If the user’s die is smaller, it should display, “Gising na friend,...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT