Stefan Karlsson/PersonalPage/Education/Matlab With Applications/e2
Excercise 2, Matrices, program flow and sound of music
Bring headsets or earpieces so you can listen to audio without disrupting the class. Example output for task 3:
All files needed in a zip file here
Deadline to submit your tasks: 12am(24.00 hrs) NEW DEADLINE: 21th of february.
FAQs
- When i copy paste certain code parts into matlab from the pdf, it doesnt work!
There are some problems copying from pdf files in general. There might be odd line breaks and weird characters appearing from nowhere. For this reason, I supplied scripts for the bigger code parts of the pdf. The best way to solve this issue if you find problems is to open a text editor, paste the code in there first, see that it is the same as it appears in the pdf(modify it otherwise), and paste the result into matlab.
- When I use the sound function, I cant get sound to play simultaneously
There is a Matlab version issue. In order to play sound in the way that is instructed, you can use the following lines in older versions of Matlab:
y1 = playSheetOfMusic1(0,6000); y2 = playSheetOfMusic1(0,4000); load chirp; wavplay(y, 'async'); wavplay(y1,40000,'sync' ); wavplay(y, 'async'); wavplay(y2,40000,'sync' );