Lecture 7 Notes

Simple 3 line script draw a black square then a

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: bout improvements to algorithms Note •  Book Eg3_1.m is ugly (but remarks and analysis are correct). •  SimplerEg_1.m is cleaner (remarks and analysis also apply) •  Available via setup for HW3 –  E.g., aM^2> bM holds for all M>b/a. •  Papers are wri`en when methods of reducing the order of an algorithm are discovered (e.g., going from M^2 to M log M) 2 2/13/14 Example Drawing •  Matlab supports several drawing primi,ves •  We’ve created some user defined func,ons for you to try •  Very easy to use •  Beau,ful (Clean) Output Insight Through Compu,ng Example Insight Through Compu,ng Example Insight Through Compu,ng Example DrawRect DrawRect(-1,-2,6,3,’y’) Insight Through Compu,ng Insight Through Compu,ng 3 2/13/14 DrawDisk DrawStar DrawDisk(1,3,4,’r’) Insight Through Compu,ng A Simple 3- line Script Draw a black square. Then a magenta disk. Then a yellow star. Insight Through Compu,ng A General Framework close all figure axis equal off hold on Fragment involving DrawRect’s, DrawDisk’s and/or DrawStar’s hold off shg DrawStar(1,3,4,’g’) Insight Through Compu,ng Solu,on close all figure axis equal off hold on Dr...
View Full Document

Ask a homework question - tutors are online