lecture20_slides

lecture20_slides - Overview of today Today Review of...

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

View Full Document Right Arrow Icon
Overview of today Today: Review of concepts from last time Formatted printing Reading from and writing to files in Matlab - Visualizing data in Matlab - Functions vs. scripts Next time: - Methods for clustering gene expression data
Background image of page 1

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

View Full Document Right Arrow Icon
Picture from http://www.socialresearchmethods.net Intuitive idea behind differential expression analysis: defining a significance metric (T-statistic)
Background image of page 2
How do we assess significance? Frequency histogram (slide adapted from David Montaner) When means are sampled from a normal distribution, if there is no difference , the t- statistic has a characteristic distribution: “Student‟s T- distribution”
Background image of page 3

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

View Full Document Right Arrow Icon
Writing to/Reading from Files Matlab can write to/read three kinds of files: binary Matlab workspace files (.mat extension) MS Excel file (.xls extension) Regular text files of formatted data (any extension)
Background image of page 4
Saving/Loading Matlab workspaces Saving the entire workspace: >> save your-filename (saves to your-filename.mat) To load this file: >> load your-filename To clear your workspace or any variable: >> clear all >> clear variable-name (.mat files) Workspace file_io1.m
Background image of page 5

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

View Full Document Right Arrow Icon
Saving/Loading Matlab workspaces Saving specific variables from your workspace: >> save(‘your - filename’,’var1’,’var2’); (saves only var1, var2 to your-filename.mat) (.mat files) Workspace file_io1.m
Background image of page 6
Saving/Loading Matlab workspaces file_io1.m
Background image of page 7

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

View Full Document Right Arrow Icon
Saving/Loading Excel files Loading data from an Excel file: >> [num,text,all]=xlsread(‘your - filename’); >> [num,text]=xlsread(‘your - filename’); >> [num]=xlsread(‘your - filename’); Saving data to an Excel file: >> [success,mesg]=xlswrite(‘outfile’,variable,’cell - range’); (type ‘help xlsread’,’help xlswrite’ for other options) file_io1.m
Background image of page 8
Saving/Loading Excel files file_io1.m (type „help xlsread‟,‟help xlswrite‟ for other options)
Background image of page 9

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

View Full Document Right Arrow Icon
Writing to text files Formatted printing: fprintf printing.m
Background image of page 10
Writing to/Reading from text files For any file I/O, you’ll always: Open a file: >> file_handle=fopen(‘your - filename’,’r’); >> file_handle=fopen(‘your - filename’,’w’); r read w write r+ read and write (don’t create) w+ truncate or create for read and write a open (or create if no file exists) and write <Read or write to the file> Close the file: >> fclose(file_handle);
Background image of page 11

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

View Full Document Right Arrow Icon
Writing to text files Open a file: >> file_handle=fopen(‘your - filename’,’w’); w write (overwrites the file) a open (or create if no file exists) and write (appends to the file)
Background image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 44

lecture20_slides - Overview of today Today Review of...

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

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