Universiteit Stellenbosch University
Applied MathematicsToegepaste Wiskunde

Lecturer:Dosent:

Prof JAC Weideman,
A315, weideman@sun.ac.za

Coordinator:Koordineerder:

Dr Nick Hale,
A410, nickhale@sun.ac.za

Important notices:Belangrike kennisgewings:

  • Note the MATLAB 2017b launch party on 21 September! Sien die MATLAB 2017b bekendstellings partytjie op 21 September! Info here and here. (FREE T-SHIRT!) Register here.
  • It has come to our attention that the links from the lecture notes to the videos on SUNLearn have changed, so clicking on the video icon on the pages do not work anymore. We are looking into fixing the problem. Meanwhile, you can go directly to SUNLearn and view the videos there. Ons het gesien die skakels van die lesingnotas na die SUNLearn videos het verander, so deur te kliek op die video ikoon op die bladsye werk nie meer nie. Ons sal die probleem probeer regstel. In die tussentyd kan jy direk na SUNLearn gaan en die videos daar besigtig.
  • Solutions to A1 and some common mistakes can be found here (updated 11 Sept).
    A histogram of test scores can be found here.
    Oplossings tot A1 en algemene foute kan hier gekry word (ogedateer 11 Sept).
    'n Histogram van toetspunte kan hier gekry word.
  • Vacation challenge: Show how the multiple choice problem from the test can be answered by hand calculation (no computer). Vakansie uitdaging: Wys hoe die multikeuse probleem van die toets met handberekening beantwoord kan word (geen rekenaar).
  • Assignment 4 is available here. Due 22 September 16:00. Opdrag 4 is hier beskikbaar. Inhandig 22 September 16:00.

Assignments:Werkopdragte:

You should use this template. Gebruik hierdie templaat.

Assignments should be submitted in both of the following formats: Opdragte moet ingehandig word in beide die volgende formate:

  • In hardcopy (published using MATLAB's publish function from the toolbar [video]).
    Hand-in in the locked box across from A307/A308.
    In harde kopie ('published' met MATLAB se publish funksie van die nutsbalk [video]).
    Inhandig in die toesluit boks oorkant A307/A308.
  • In electronic copy (a single m-file) here: In elektroniese vorm ('n enkele m-leer) hier:

Assignments submitted in only one format may not be marked! The markers will mark the hard copy. The electronic copy will be used for plagiarism checks and as a backup in case your hard copy gets misplaced. Opdragte wat net in een van die formate ingehandig word mag dalk nie gemerk word nie. Die nasieners merk die gedrukte stuk. Die elektroniese kopie word gebruik vir plagiaattoetse en rugsteun as jou gedrukte stuk dalk vermis raak.

Hints for the current assignment will be given in the blue box below. Wenke vir die huidige opdrag word in die blou boksie hieronder gegee.

Assignment Opdrag Due date Sperdatum Solution Oplossing
assign1.pdf 28/07/2017 assign1sols.m & assign1sols.pdf & assign1sols.mp4 (video)
assign2.pdf 11/08/2017 assign2sols.m & assign2sols.pdf & assign2sols.mp4 (video)
assign3.pdf 25/08/2017 assign3sols.pdf (no .m, no video)
assign4.pdf 22/09/2017

Hints for Assignment 4Wenke vir Opdrag 4:

  • Problem 1-4: Matrices with this structure can be assembled easily with the hankel command. (There is also the related toeplitz command that is worth knowing.) Probleem 1-4: Matrikse met hierdie struktuur kan maklik met die hankel bevel saamgestel word. (Daar is ook die verwante toeplitz bevel wat die moeite werd is om van te weet.)
  • Problem 2(b): The idea here is to use the information of Prob 1 to compute the values of terms (A) and (C) on the lecture slide. Then pretend the inequality is an equality and compute the condition number as (B) = (A)/(C). Because the inequality is not really an equality we only get an estimate of the condition number this way (in fact, a lower bound on the actual number), but it should not be too far off from the numbers computed in part (a). Probleem 2(b): Die idee hier is om die inligting van Prob 1 te gebruik om die waardes van die terme (A) en (C) op die lesingbladsy te bereken. Verbeel jou nou die ongelykheid is 'n gelykheid en bereken die kondisiegetal as (B) = (A)/(C). Omdat die ongelykheid nie regtig 'n gelykheid is nie, kry mens net 'n beraming van die kondisiegetal op hierdie manier (inderwaarheid 'n ondergrens op die werklike getal), maar dit behoort nie te ver van die waardes bereken in deel (a) te wees nie.
  • Problem 4: The idea is to perturb the (1,1) element of A from 0 to s, say, and then compute the value of s that makes the determinant zero. To do this with fzero you will therefore have to write an anonymous function of the form f = @(s) det(...). (Note that it is possible to solve the problem by hand, and we recommend that you do so in addition to your numerical calculation.) Probleem 4: Die idee is om die (1,1) element van A van 0 na s versteur, en dan die waarde van s te bereken wat die determinant nul maak. Om fzero hiervoor te gebruik sal jy dus 'n anonieme funksie van die vorm f = @(s) det(...) moet skryf. (Let op dat dit moontlik is om die probleem met die hand op te los, en ons beveel aan dat jy dit doen addisioneel tot jou numeriese berekening.)
  • Problem 5: At each of the three reactors, the total mass of the species that enters per second, should equal the total mass that exits per second. (This is called conservation of mass, and is an important physical principle that you will see in other applications as well.) Probleem 5: By elk van die drie reaktore moet die totale massa van die spesies wat invloei per sekonde, gelyk wees aan die totale massa wat uitvloei per sekonde. (Dit word behoud van massa genoem en is 'n belangrike fisiese beginsel wat jy elders ook sal teekom).
  • Problem 5: To "investigate the conditioning" it is sufficient to compute the condition number and decide if it's large or small. Probleem 5: Om die "kondisionering te ondersoek" is dit voldoende om die kondisiegetal te bereken en te besluit of dit groot of klein is.
  • Problem 6: We suspect that the given system of differential equations is wrong (do you agree and can you fix it?) The matrix equation seems to be correct, however, which is all you need for solving the problem. Probleem 6: Ons vermoed die gegewe stelsel differensiaalvergelykings is verkeerd (stem jy saam en kan jy dit regmaak?) Die matriksvergelyking blyk egter korrek te wees, wat al is wat nodig is om die probleem op te los.
  • Problem 6: The required figures should display the amplitudes of the oscillations of the three floors something like this. Note that the amplitude of the top floor was scaled (normalized) to 1 (an arbitrary specification imposed by the problem statement). There should be three such figures: one for each of the three frequencies. Probleem 6: Die gevraagde figure moet die amplitudes van die ossillasies van die drie verdiepings vertoon iets soos hierdie. Let op dat die amplitude van die boonste verdieping geskaal is tot 1 (arbitrer deur die probleemstelling voorgeskryf). Daar moet drie sulke figure wees: een vir elk van die drie frekwensies.
  • Problem 6: If you are unfamiliar with the mathematical technique employed here, we recommend that you read the Normal Mode entry in Wikipedia (especially the section on coupled oscillators). Probleem 6: As jy nie vertroud is met die wiskundige tegniek wat hier gebruik word nie beveel ons aan jy lees die Normal Mode inskrywing in Wikipedia (veral die afdeling oor gekoppelde ossillators).

Common mistakes in assignments:Algemene Foute in Opdragte:

  • Use the template. (It is best to download using Google Chrome as Internet Explorer messes up the line breaks.) Gebruik die templaat. (Dit is beter om Google Chrome te gebruik aangesien Inernet Explorer die lynbreke opmors.)
  • You should use %%   to break up the questions in the script. (The space afterwards is important!)
    If you don't do this all results will appear at the end of publish and you will have missing figures.
    Jy moet %%   gebruik om die vrae in jou teksleer te skei. (Die spasie agterna is belangrik!)
    As jy dit nie doen nie sal al die resultate aan die einde van jou 'publish' dokument verskyn en figure sal afwesig wees.
  • Do not use spaces in file or directory (folder) names. Moenie spasies gebruik in jou legger of 'folder' ('directory') name nie.
  • File names should not start with numeric characters, only alphabetic. Jou teksleer se naam moenie met numeriese karakters begin nie, slegs alfabeties.
  • Do not copy the output lines ans = ... from the command line to the publish script. Moenie die afvoerlyne ans = ... vanaf die bevelskyn kopieer na die 'publish' dokument nie.
  • Turn off subplot when you are finished with it by typing subplot(1,1,1). Sit subplot af as jy klaar is daarmee deur subplot(1,1,1) te tik.
  • Be sure to hand in hardcopy of the published version of your assignment, not the m-file.
    The m-file does not show the answers and figures, hence we cannot mark it.
    Maak seker dat jy die hardekopie van die 'publish' dokument inhandig, nie die m-leer nie.
    Die m-leer wys nie die antwoorde en figure nie, en kan dus nie gemerk word nie.
  • The hardcopy document you hand in should show results (output). Just showing us your code is not good enough, we need to see its output. Missing output could be a misplaced semi-colon (;) that suppresses the output, or a Publish that failed. (In the latter case, we recommend that you watch the Publish video.) Output will not appear if there were coding mistakes (errors) in earlier problems. Die hardekopie dokument wat jy inhandig moet resultate (afvoer) wys. Om net jou kode te wys is nie goed genoeg nie, ons moet die afvoer sien. Afvoer wat vermis word kan moontlik toegeskryf word aan 'n oorbodige kommapunt (;) wat die afvoer onderdruk, of 'n 'Publish' wat gefaal het. (In lg geval raai ons jou aan om die video oor 'Publish' te kyk.) Afvoer sal ook nie verskyn as daar kodeerfoute in vorige vrae was nie.
  • Do not save your published file in HTML format and then try to print it. The figures will be missing (they are saved in a different folder). Instead, print immedately upon Publishing. If you wish to save the published version of your assignment, convert to PDF first. Moenie probeer om jou gepubliseerde dokument in HTML formaat te stoor en dan later te druk nie. Die figure gaan weg wees (hulle word apart gestoor). Druk eerder sodra jy gepubliseer het. As jy die gepubliseerde weergawe van jou opdrag wil stoor, doen dit eerder in PDF formaat.
  • Seriously. DO NOT USE SPACES in file and/or directory (folder) names. Ernstig nou, MOENIE SPASIES GEBRUIK in jou teksleer of 'folder' name nie.

Information Sheet and Outcomes:Inligtingstuk en Uitkomste:

  • Can be found here (afr) and here (eng). Kan hier (afr) en hier (eng) gevind word.

Lecture timetable:Lesingrooster:

  • TuesdayDinsdag 08:00: K302 (Eng)
  • TuesdayDinsdag 09:00: K302 (Afr)
  • WednesdayWoensdag 09:00: E352/353 (Afr)
  • WednesdayWoensdag 10:00: E352/353 (Eng)

Tutorials:Tutoriale:

  • ThursdayDonderdag 12:00: S207A, S207B, S203
  • If you don't need help with your assignment
    you are under no obligation to attend the practical.
    As jy nie hulp met jou opdrag nodig het nie is jy
    onder geen verpligting om die prakties by te woon nie.
  • Lab etiquette: Before asking for help please try to find answers
    first in the blue box above, then on the lecture slides or videos.
    Lab maniere: Voordat jy vir hulp vra, probeer eers antwoorde kry
    in die blou boksie bo, dan op die lesingnotas of die videos.

Flexible Assessment dates:Datums vir buigsame assessering:

A1: 31 August, A2: 14 November, A3: 30 November

The official document on flexible assessment can be found here. General stipulations here. Die amptelike dokument oor buigsame assessering kan hier gevind word. Algemene regulasies hier.

Lecture notes:Lesingnotas:

The fact that the lecture slides are available here should not be taken as invitation to skip class.
Not everything covered in class appear on these slides.
Die feit dat die klasnotas hier beskikbaar is moenie gesien word as aanmoediging om klas te bank nie.
Nie alles wat in die klas behandel is verskyn op hierdie notas nie.

  • Week 1 (18, 19, 20 Jul): Introduction to MATLAB Inleiding tot MATLAB, Appendix A1-A6
  • Week 2 (24, 25 Jul): Introduction continued Inleiding vervolg, Appendix A7-A8, A11
  • Week 3 (01 Aug, 02 Aug): Solving nonlinear equations Die oplossing van nie-lineere vergelykings, 3.1-3.6
  • Week 4 (08 Aug): Solving nonlinear equations Die oplossing van nie-lineere vergelykings, 3.8-3.9
  • Week 5 (15, 16 Aug): Solving nonlinear equations 3.10; Linear equations 4.1-4.2 Die oplossing van nie-lineere vergelykings 3.10; Lineere vergelykings 4.1-4.2,
  • Week 6 (22, 23 Aug): Solving linear equations Die oplossing van lineere vergelykings, 4.1-4.3, 4.5, 4.8-4.9
  • Week 7 (28 Aug-1 Sept): Test A1 on Thursday 31 August; no lectures Toets A1 op Donderdag 31 Augustus; geen lesings nie
  • Week 8 (4-8 Sept): Vacation week; no lectures Vakansieweek; geen lesings nie
  • Week 9 (12, 13 Sept): Solving linear equations Die oplossing van line√™re vergelykings, 4.10-4.11, 5.1-5.2, 5.7
  • Week 10 (19, 20 Sept): Curve fitting and interpolation Krommepasssing en interpolasie, 6.1-6.5

Useful links:Nuttige skakels: