Lec06 IAM550 D. Cramer 9/12/2019 simple sort, advanced ...
Lec06 IAM550 D. Cramer 9/12/2019 simple sort, advanced plotting
Sorting
? Often, you'll need to sort a list of values ? Thousands of possible algorithms of varying efficiency and different applications
Comparison sorts: sort by comparing two values is list ? Bubble sort
Very inefficient, but easy to code (test your knowledge of conditionals and loops!) For each value, loop through later values and swap when out-of-order Example: Make a vector of exp(sin^4). Sort to find quartiles. Explain quartiles. ? Quicksort () Usually efficient (MATLAB's sort command uses this)
MATLAB sort: a_sorted = sort(a) "Divide and Conquer" - requires recursion
Advanced plotting:
? Line properties: o plot syntax: plot(x,y[,s][,prop1,prop1value...]) ? s: line color/marker/style string specification (can combine as in 'r^-') ? line markers - s is 'o', '+', '^', etc. ? line color - s is 'r', 'g', 'b', etc. ? line type - s is '-', '--', ':', etc. o properties: 'MarkerSize', 'LineWidth', etc.
? Axis labels (xlabel, ylabel, title) , etc. o xlabel(text[,prop1,prop1value...]) o multi-line text: {'Line 1', 'Line 2', ...} o Annotations and greek characters:
? Axes properties o axis: set axis ranges (axis([xmin, xmax, ymin, ymax]) o gca - current axes object ? two ways to access (set() or 'dot' notation) ? set(gca,'LineWidth',20) or ax=gca; ax.LineWidth=20
1
? other properties: 'TickLength', etc. ? semilogx, semilogy, loglog ? grid on ? Multiple lines - `hold on' - or in same plot command (i.e., plot(x1,y1,s,x2,y2...))
o legend[(label1,...labelN[,prop1,prop1value...])] ? properties: 'Location' ('NorthEast', etc.), 'Orientation' ('horizontal')
o can use 'DisplayName' property in plot command to set labels ? Multiple sub plots
o subplot(nrows, ncols, currentposition) ? Example with looping
2
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- introduction to agilent ads circuit simulation tools
- visualizing in r advanced plotting
- overview of nx plotting
- advanced plotting github pages
- chapter 2 advanced xy plotting techniques
- 6 057 introduction to matlab lecture 2 visualization and
- lec06 iam550 d cramer 9 12 2019 simple sort advanced
- rapidminer advanced charts
- matlab tutorial iii variables files advanced plotting
- advanced plotting devices inc
Related searches
- toyota 1.9 financing 2019 highlander
- high school grades 9 12 names
- toyota 1 9 financing 2019 highlander
- cramer top 2019 picks
- cramer top 2019 stocks
- jnc 9 guidelines 2019 pdf
- ecclesiastes 4 9 12 commentary
- square d nema 12 disconnect
- schedule d instructions 2019 1040
- zyrtec d 12 hour
- online schools 9 12 grade
- is hemoglobin 12 9 good