lecture21_slides

lecture21_slides - Overview of today Today: Review of...

Info iconThis preview shows pages 1–15. Sign up to view the full content.

View Full Document Right Arrow Icon
Overview of today Today: Review of concepts from last time Visualizing data in Matlab - Functions vs. scripts - Introduction to clustering
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Plotting in Matlab Visualizing your data is important! Matlab supports almost any type of graph you can think of: Line plots: linear, log scale Bar plots Pie charts Histograms Contour plots 2-D mesh plots 2-D intensity plots Specialized statistical plots: boxplots, scatterplots, distribution plots (for interactive plotting tool, type „plottools‟)
Background image of page 2
Plotting in Matlab: Line plots How can we plot things like: y = f(x) ? >> plot(x_vector,y_vector); plots.m
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Plotting in Matlab: Line plots Change directly on figure object Click , then double-click on plotted line Or specify these properties in command: >> plot(x_vector,y_vector,’ - .dr’); plots.m <line><marker><color>
Background image of page 4
Plotting in Matlab: Line plots Plotting multiple functions on the same graph: >> plot(x_vector1,y_vector1,x_vector2,y_vector2); OR >> plot(x_vector1,y_vector1); >> hold on; >> plot(x_vector2,y_vector2);
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Plotting in Matlab: Line plots Plotting multiple functions on the same graph: plots.m
Background image of page 6
Plotting in Matlab: Line plots Other line plots similar parameters: plot3: 3-D x,y,z plotting loglog: log scales for both x,y axes semilogx: log scale x-axis with linear scale y semilogy: log scale y-axis with linear scale x plotyy: allows two y-axis labels for plotting two different- scaled functions over the same x axis simultaneously
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Saving and Exporting Plots To save a figure after plotting: save as Matlab .fig file: File->Save As export to an image: (1) File->Save As, choose image type (2) >>print(gcf,’ -d<driver- name>’,’ - r<resolution>’,’<outfile>’) (see for example of printing to a file) plots.m
Background image of page 8
More Plots: histograms hist_demo.m >> hist(<data_vector>,<num_bins>);
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Example: MinC protein sequence composition MinC- protein in bacteria that determines septum formation See minc.txt for sequence info, minc_comp.xls for composition summary
Background image of page 10
More Plots: bar graphs hist_demo.m >> bar3(<data_matrix>);
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
3D plots: surf: plots a surface surfc: plots a surface, with contour lines on the xy plane contour: just the contours on the xy plane pcolor or imagesc: like a heat map
Background image of page 12
Exercise: more on analyzing MinC protein sequence composition Treat the vectors of amino acid contents in minc_comp.xls as a set of features for each of the organisms. Using Euclidean distance between these feature vectors as a measure of similarity, calculate pairwise similarities between all possible pairs of organisms. Visualize the results using Matlab‟s imagesc function.
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Matlab scripts vs. functions
Background image of page 14
Image of page 15
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/21/2011 for the course CSCI 3003 taught by Professor Staff during the Spring '08 term at Minnesota.

Page1 / 45

lecture21_slides - Overview of today Today: Review of...

This preview shows document pages 1 - 15. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online