SlideShare a Scribd company logo
1 of 1
Download to read offline
Write sinusoidal mathematical equations in MATLAB to play your favorite song
Solution
Fs = 1000; %# Samples per second
toneFreq = 50; %# Tone frequency, in Hertz
nSeconds = 2; %# Duration of the sound
y = sin(linspace(0, nSeconds*toneFreq*2*pi, round(nSeconds*Fs)));
or
sound(y,FS); %# play sound at sampling rate
or
soundsc(y,Fs);
or
wavread()
sound()
soundsc()
flipud()
wavwrite()

More Related Content

More from trishacolsyn25353

5) look up the following health-based peer-reviewed journal article .pdf
5) look up the following health-based peer-reviewed journal article .pdf5) look up the following health-based peer-reviewed journal article .pdf
5) look up the following health-based peer-reviewed journal article .pdf
trishacolsyn25353
 
class Array { public static int getTotal(int[][]numbers ) { .pdf
class Array { public static int getTotal(int[][]numbers ) { .pdfclass Array { public static int getTotal(int[][]numbers ) { .pdf
class Array { public static int getTotal(int[][]numbers ) { .pdf
trishacolsyn25353
 
Write 300-400 words review of the paper using your own words and n.pdf
Write 300-400 words review of the paper using your own words and n.pdfWrite 300-400 words review of the paper using your own words and n.pdf
Write 300-400 words review of the paper using your own words and n.pdf
trishacolsyn25353
 
will left-wing terror increase, remain the same, or decrease in the .pdf
will left-wing terror increase, remain the same, or decrease in the .pdfwill left-wing terror increase, remain the same, or decrease in the .pdf
will left-wing terror increase, remain the same, or decrease in the .pdf
trishacolsyn25353
 
whats is the hostory of mathematicsSolutionIt deals with the .pdf
whats is the hostory of mathematicsSolutionIt deals with the .pdfwhats is the hostory of mathematicsSolutionIt deals with the .pdf
whats is the hostory of mathematicsSolutionIt deals with the .pdf
trishacolsyn25353
 
Wendy and Peter want to buy property together.  Wendy will be contri.pdf
Wendy and Peter want to buy property together.  Wendy will be contri.pdfWendy and Peter want to buy property together.  Wendy will be contri.pdf
Wendy and Peter want to buy property together.  Wendy will be contri.pdf
trishacolsyn25353
 
The knowledge of how the Internal Revenue Code treats business activ.pdf
The knowledge of how the Internal Revenue Code treats business activ.pdfThe knowledge of how the Internal Revenue Code treats business activ.pdf
The knowledge of how the Internal Revenue Code treats business activ.pdf
trishacolsyn25353
 
Respond to the following by writing at least one paragraph for each .pdf
Respond to the following by writing at least one paragraph for each .pdfRespond to the following by writing at least one paragraph for each .pdf
Respond to the following by writing at least one paragraph for each .pdf
trishacolsyn25353
 
Practice Problems -Due next class period Fully describe how nitrogen .pdf
Practice Problems -Due next class period Fully describe how nitrogen .pdfPractice Problems -Due next class period Fully describe how nitrogen .pdf
Practice Problems -Due next class period Fully describe how nitrogen .pdf
trishacolsyn25353
 
List four principle events that occur in the ER with regard to prote.pdf
List four principle events that occur in the ER with regard to prote.pdfList four principle events that occur in the ER with regard to prote.pdf
List four principle events that occur in the ER with regard to prote.pdf
trishacolsyn25353
 

More from trishacolsyn25353 (20)

A student wanted to look at germination of five different seeds in ve.pdf
A student wanted to look at germination of five different seeds in ve.pdfA student wanted to look at germination of five different seeds in ve.pdf
A student wanted to look at germination of five different seeds in ve.pdf
 
A laboratory technician mixes 1 mL of a stock culture with 99 mL of .pdf
A laboratory technician mixes 1 mL of a stock culture with 99 mL of .pdfA laboratory technician mixes 1 mL of a stock culture with 99 mL of .pdf
A laboratory technician mixes 1 mL of a stock culture with 99 mL of .pdf
 
5) look up the following health-based peer-reviewed journal article .pdf
5) look up the following health-based peer-reviewed journal article .pdf5) look up the following health-based peer-reviewed journal article .pdf
5) look up the following health-based peer-reviewed journal article .pdf
 
Click the icon to view ne able of de More Info Fluid Density Height o.pdf
Click the icon to view ne able of de More Info Fluid Density Height o.pdfClick the icon to view ne able of de More Info Fluid Density Height o.pdf
Click the icon to view ne able of de More Info Fluid Density Height o.pdf
 
class Array { public static int getTotal(int[][]numbers ) { .pdf
class Array { public static int getTotal(int[][]numbers ) { .pdfclass Array { public static int getTotal(int[][]numbers ) { .pdf
class Array { public static int getTotal(int[][]numbers ) { .pdf
 
Write 300-400 words review of the paper using your own words and n.pdf
Write 300-400 words review of the paper using your own words and n.pdfWrite 300-400 words review of the paper using your own words and n.pdf
Write 300-400 words review of the paper using your own words and n.pdf
 
will left-wing terror increase, remain the same, or decrease in the .pdf
will left-wing terror increase, remain the same, or decrease in the .pdfwill left-wing terror increase, remain the same, or decrease in the .pdf
will left-wing terror increase, remain the same, or decrease in the .pdf
 
Which Boolean algebra theorem describes the situation where any varia.pdf
Which Boolean algebra theorem describes the situation where any varia.pdfWhich Boolean algebra theorem describes the situation where any varia.pdf
Which Boolean algebra theorem describes the situation where any varia.pdf
 
What is the time difference in myelinated vs. unmyelinated axons.pdf
What is the time difference in myelinated vs. unmyelinated axons.pdfWhat is the time difference in myelinated vs. unmyelinated axons.pdf
What is the time difference in myelinated vs. unmyelinated axons.pdf
 
whats is the hostory of mathematicsSolutionIt deals with the .pdf
whats is the hostory of mathematicsSolutionIt deals with the .pdfwhats is the hostory of mathematicsSolutionIt deals with the .pdf
whats is the hostory of mathematicsSolutionIt deals with the .pdf
 
what is spiled identity as in disabilityAre all aspects of spoile.pdf
what is spiled identity as in disabilityAre all aspects of spoile.pdfwhat is spiled identity as in disabilityAre all aspects of spoile.pdf
what is spiled identity as in disabilityAre all aspects of spoile.pdf
 
Wendy and Peter want to buy property together.  Wendy will be contri.pdf
Wendy and Peter want to buy property together.  Wendy will be contri.pdfWendy and Peter want to buy property together.  Wendy will be contri.pdf
Wendy and Peter want to buy property together.  Wendy will be contri.pdf
 
Una carga puntual de 3 C, esta contenida en una superficie cerrada de.pdf
Una carga puntual de 3 C, esta contenida en una superficie cerrada de.pdfUna carga puntual de 3 C, esta contenida en una superficie cerrada de.pdf
Una carga puntual de 3 C, esta contenida en una superficie cerrada de.pdf
 
Thomas Insel (TedX Talk) suggests that the terms behavioral disorder.pdf
Thomas Insel (TedX Talk) suggests that the terms behavioral disorder.pdfThomas Insel (TedX Talk) suggests that the terms behavioral disorder.pdf
Thomas Insel (TedX Talk) suggests that the terms behavioral disorder.pdf
 
The knowledge of how the Internal Revenue Code treats business activ.pdf
The knowledge of how the Internal Revenue Code treats business activ.pdfThe knowledge of how the Internal Revenue Code treats business activ.pdf
The knowledge of how the Internal Revenue Code treats business activ.pdf
 
The additional production yielded by the use of one extra unit of va.pdf
The additional production yielded by the use of one extra unit of va.pdfThe additional production yielded by the use of one extra unit of va.pdf
The additional production yielded by the use of one extra unit of va.pdf
 
Respond to the following by writing at least one paragraph for each .pdf
Respond to the following by writing at least one paragraph for each .pdfRespond to the following by writing at least one paragraph for each .pdf
Respond to the following by writing at least one paragraph for each .pdf
 
Practice Problems -Due next class period Fully describe how nitrogen .pdf
Practice Problems -Due next class period Fully describe how nitrogen .pdfPractice Problems -Due next class period Fully describe how nitrogen .pdf
Practice Problems -Due next class period Fully describe how nitrogen .pdf
 
Name three approaches of how single mode laser can be obtained. Expl.pdf
Name three approaches of how single mode laser can be obtained. Expl.pdfName three approaches of how single mode laser can be obtained. Expl.pdf
Name three approaches of how single mode laser can be obtained. Expl.pdf
 
List four principle events that occur in the ER with regard to prote.pdf
List four principle events that occur in the ER with regard to prote.pdfList four principle events that occur in the ER with regard to prote.pdf
List four principle events that occur in the ER with regard to prote.pdf
 

Recently uploaded

Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
CaitlinCummins3
 

Recently uploaded (20)

The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptx
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
Scopus Indexed Journals 2024 - ISCOPUS Publications
Scopus Indexed Journals 2024 - ISCOPUS PublicationsScopus Indexed Journals 2024 - ISCOPUS Publications
Scopus Indexed Journals 2024 - ISCOPUS Publications
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptx
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
Supporting Newcomer Multilingual Learners
Supporting Newcomer  Multilingual LearnersSupporting Newcomer  Multilingual Learners
Supporting Newcomer Multilingual Learners
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptx
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
 

Write sinusoidal mathematical equations in MATLAB to play your favor.pdf

  • 1. Write sinusoidal mathematical equations in MATLAB to play your favorite song Solution Fs = 1000; %# Samples per second toneFreq = 50; %# Tone frequency, in Hertz nSeconds = 2; %# Duration of the sound y = sin(linspace(0, nSeconds*toneFreq*2*pi, round(nSeconds*Fs))); or sound(y,FS); %# play sound at sampling rate or soundsc(y,Fs); or wavread() sound() soundsc() flipud() wavwrite()