[go: up one dir, main page]

0% found this document useful (1 vote)
127 views2 pages

ECE 203: Introduction To MATLAB Programming Assignment 3 (20 Points)

This document outlines an assignment with two problems for an Introduction to MATLAB Programming course. Students are asked to [1] record an audio file of themselves saying a sentence with at least four words, [2] write a script to reverse and repeat the words in the audio file and save it as a new file, and [3] write another script to determine and print the shortest word in the original audio file by duration. Students are to submit the two audio files and two MATLAB script files.

Uploaded by

Aman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
127 views2 pages

ECE 203: Introduction To MATLAB Programming Assignment 3 (20 Points)

This document outlines an assignment with two problems for an Introduction to MATLAB Programming course. Students are asked to [1] record an audio file of themselves saying a sentence with at least four words, [2] write a script to reverse and repeat the words in the audio file and save it as a new file, and [3] write another script to determine and print the shortest word in the original audio file by duration. Students are to submit the two audio files and two MATLAB script files.

Uploaded by

Aman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

ECE 203: Introduction to MATLAB Programming

Assignment 3 (20 Points)


Using the provided program in resources record_sound.m record a sentence in your voice (with a
minimum of four words). You may name the audio file “my_sentence.wav”
Problem 1 (12 Points)
1. Create a new Script file “run_reverse_repeat_words.m”
2. Load the audio “my_sentence.wav”
3. Play the audio file and pause for 7 seconds.
4. Create a new figure window. Plot a waveform of the audio file against sample indices and
make sure to label the axes.
5. Segment the words present in the audio file by determining the indices of each word using
MATLAB’s data cursor in the waveform plot.
6. Now create an array named “repeat_reverse” and concatenate the words such that each
word repeats in the reverse order. For instance, if your original audio contained the words
“One, Two, Three, Four” then your repeat_reverse audio should contain “Four Four, Three
Three, Two Two, One One”
7. Create a new figure window. Plot the waveform of repeat_reverse against sample indices
and make sure to label the axes.
8. Make sure to write the repeat_reverse audio variable into an audio file
“repeat_once_reverse.wav”

Problem 2 (8 Points)

1. Create a new Script file “run_determine_shortest_word.m”


2. Load the audio “my_sentence.wav”
3. Segment the words present in the audio file by determining the indices of each word using
MATLAB’s data cursor in the waveform plot. (You may paste the work you did for
Problem 1 Steps 1-4).
4. Determine the duration of each word in seconds
5. Determine the shortest word (lowest in terms of seconds) in the sentence you recorded
6. Print the shortest word along with its duration in seconds using fprintf()
Things to Submit

1. my_sentence.wav
2. repeat_once_reverse.wav
3. run_reverse_repeat_words.m
4. run_determine_shortest_word.m

You might also like