MATLAB. Input and Output



Similar documents
MATLAB Workshop 14 - Plotting Data in MATLAB

Beginner s Matlab Tutorial

PLOTTING IN SCILAB.

Plotting: Customizing the Graph

How long is the vector? >> length(x) >> d=size(x) % What are the entries in the matrix d?

Petrel TIPS&TRICKS from SCM

Visualization of 2D Domains

Topography of an Origin Project and Workspace

Analysis of System Performance IN2072 Chapter M Matlab Tutorial

The following is an overview of lessons included in the tutorial.

aarhus MicroStation Print Organizer V8i-SS3 Your Technology Advantage Spring 2013 Jeanne Aarhus

Green = 0,255,0 (Target Color for E.L. Gray Construction) CIELAB RGB Simulation Result for E.L. Gray Match (43,215,35) Equal Luminance Gray for Green

Importing and Exporting With SPSS for Windows 17 TUT 117

ICEM CFD Tutorial. Simple Duct Grid

VisIt Visualization Tool

Datalogger Graph Software Help

Visualization of Output Data from Particle Transport Codes

Introduction.

Real Time Monitor. A Real-Time Windows Operator Interface. DDE Compliant. (for remote data display)

Integrated Company Analysis

PLOTTING COMMANDS (!' ) "' # "*# "!(!' +,

KaleidaGraph Quick Start Guide

Zahner 08/2013. Monitor measurements in a separate window.

G563 Quantitative Paleontology. SQL databases. An introduction. Department of Geological Sciences Indiana University. (c) 2012, P.

DataPA OpenAnalytics End User Training

Microsoft Excel 2010 Charts and Graphs

MatLab Basics. Now, press return to see what Matlab has stored as your variable x. You should see:

List of FTP commands for the Microsoft command-line FTP client

Introduction to MATLAB (Basics) Reference from: Azernikov Sergei

Item Analysis for Key Validation Using MULTILOG. American Board of Internal Medicine Item Response Theory Course

MATLAB 7 Creating Graphical User Interfaces

R Graphics Cookbook. Chang O'REILLY. Winston. Tokyo. Beijing Cambridge. Farnham Koln Sebastopol

MAS 500 Intelligence Tips and Tricks Booklet Vol. 1

ExpertCAD Release Summary March 2010

Lab 3. GIS Data Entry and Editing.

MARS STUDENT IMAGING PROJECT

Computer Training Centre University College Cork. Excel 2013 Pivot Tables

Introduction to R and UNIX Working with microarray data in a multi-user environment

Zhenping Liu *, Yao Liang * Virginia Polytechnic Institute and State University. Xu Liang ** University of California, Berkeley

TUTORIAL - Locations & Mapping. Using the ESdat Environmental Database System. For use with ESDAT version 5

GE Healthcare Life Sciences UNICORN Evaluation for Cross Flow Filtration / User Reference Manual

MATLAB. Creating Graphical User Interfaces Version 6. The Language of Technical Computing. Computation. Visualization. Programming

5.4.8 Optional Lab: Managing System Files with Built-in Utilities in Windows 7

Tips for optimizing your publications for commercial printing

CONCEPT-II. Overview of demo examples

STATGRAPHICS Online. Statistical Analysis and Data Visualization System. Revised 6/21/2012. Copyright 2012 by StatPoint Technologies, Inc.

Understand the Sketcher workbench of CATIA V5.

TraceNet Command TM Application Suite User Guide

WEEK #3, Lecture 1: Sparse Systems, MATLAB Graphics

Preparing graphics for IOP journals

Fireworks CS4 Tutorial Part 1: Intro

Engineering Problem Solving and Excel. EGN 1006 Introduction to Engineering

Figure 1. An embedded chart on a worksheet.

Essay 5 Tutorial for a Three-Dimensional Heat Conduction Problem Using ANSYS Workbench

Linkage 3.2. User s Guide

Excel Tutorial. Bio 150B Excel Tutorial 1

DWGSee Professional User Guide

How To Use The Powerpoint 3.5 On A Computer With A Powerpoint 2.5 (Powerpoint) On A Pc Or Macbook 2.2 (Powerstation) On An Iphone Or Ipad (Powerplane)

Command-Line Operations : The Shell. Don't fear the command line...

Simple Programming in MATLAB. Plotting a graph using MATLAB involves three steps:

NiceLabel Designer Standard User Guide

BD CellQuest Pro Software Analysis Tutorial

Financial Econometrics MFE MATLAB Introduction. Kevin Sheppard University of Oxford

Introduction Course in SPSS - Evening 1

Applying MapCalc Map Analysis Software

Tutorial 2 Online and offline Ship Visualization tool Table of Contents

Digital Image Fundamentals. Selim Aksoy Department of Computer Engineering Bilkent University

Why are we teaching you VisIt?

2 ASCII TABLE (DOS) 3 ASCII TABLE (Window)

The Center for Teaching, Learning, & Technology

DaVinci Resolve 11 Menus and Keyboard Shortcuts

What is a piper plot?

Visualization Plugin for ParaView

MyOra 3.5. User Guide. SQL Tool for Oracle. Kris Murthy

u = [ 2 4 5] has one row with three components (a 3 v = [2 4 5] has three rows separated by semicolons (a 3 w = 2:5 generates the row vector w = [ 2 3

Nuclear Science and Technology Division (94) Multigroup Cross Section and Cross Section Covariance Data Visualization with Javapeño

ORACLE BUSINESS INTELLIGENCE WORKSHOP

MATLAB Basics MATLAB numbers and numeric formats

Portal Connector Fields and Widgets Technical Documentation

Converting an AutoCAD Drawing into PDF File

ESRI China (Hong Kong) Limited

Building a Simulink model for real-time analysis V Copyright g.tec medical engineering GmbH

Watershed Ecosystem & Restoration Services (WERS Mapping Application) User s Guide

Graphics in R. Biostatistics 615/815

Tutorial Guide to the IS Unix Service

Introduction to ROOT and data analysis

THE CERN/SL XDATAVIEWER: AN INTERACTIVE GRAPHICAL TOOL FOR DATA VISUALIZATION AND EDITING

WHAT IS NEW IN PTV VISSIM 7

Periodontology. Digital Art Guidelines JOURNAL OF. Monochrome Combination Halftones (grayscale or color images with text and/or line art)

There are six different windows that can be opened when using SPSS. The following will give a description of each of them.

Charting LibQUAL+(TM) Data. Jeff Stark Training & Development Services Texas A&M University Libraries Texas A&M University

Microsoft Excel 2010 Pivot Tables

Summary. Load and Open GaussView to start example

How To Create Superpath In Gta (Gta 3) And Gta 4.5 (Gts) (Gt3.5) (Geo 3.3) (Html) (Sv

Fingrid s regulating bid instruction. 1 January 2009

Licenses of savic-net for Integrated Building Management System for FDA Title 21 CFR Part 11 Compliance

The 'Excel 3D Scatter Plot' macro The Manual

Transcription:

MATLAB Input and Output Dipl.-Ing. Ulrich Wohlfarth

Input with user inputs Strings: Row vector of character (char): text = [ This is,, a text! ] String functions: help strfun Input of: Data: variable = input(string) Text: string = input(string, s ) Special signs: \n new line \\ Backslash \ Quotation marks Dipl.-Ing. Ulrich Wohlfarth 1

Formatted Output disp(string): Output of string string Formatting: string = sprintf(string,variable) Syntax corresponds to C BUT: vectorised data possible conversion of numbers into strings with function num2str(variable[,f ormat]) Dipl.-Ing. Ulrich Wohlfarth 2

Import and Export of data Load data: load f ile [ mat ascii] [variable...] Save data: save f ile [options] [variable...] options: -mat Binary MAT file -ascii 8-digit ASCII format -append append data (MAT) -ascii -double 16-digit ASCII format -ascii -tabs Tabulator separated Formatted writing into txt file: File open: f id = fopen(f ile.extension,permission) Writing: fprintf(f id,string,variable) File close: fclose(f id) Dipl.-Ing. Ulrich Wohlfarth 3

Operating System call and file management Path: current: pwd show: path Directory: change: cd directory make: mkdir directory show content: dir [directory] ls [directory] File: copy: copyfile source destination delete: delete f ile Call of Operating System:! os command Dipl.-Ing. Ulrich Wohlfarth 4

Graphics 2- and 3-dimensional plotting of data Generate a graphic (figure): figure Get current figure (handle): gcf Subplots in a figure: subplot(z,s,n) Figure: clear: clf close: close(number) Dipl.-Ing. Ulrich Wohlfarth 5

Properties of a graphic Each object of a figure has its handle h comprising a property P ropname and its value P ropv alue Important objects: Query a property: Setting a property: Delete value: figure and axes get(h, P ropn ame ) set(h, P ropn ame,p ropv alue) delete(h) Alternatively: Property Editor Dipl.-Ing. Ulrich Wohlfarth 6

2D graphics: axis, scaling and labelling Current axis (handle): gca Scaling: axis ([x min,x max,y min,y max]) automatically: axis( auto ) show grid: grid [on off] activate zoom: zoom [on off] Labelling: axis: xlabel(string), ylabel(string) title: title(string) place text: text(x value,y value,string) legend: legend(str 1,str 2... [, position]) Dipl.-Ing. Ulrich Wohlfarth 7

2D graphics: plot commands plot-command: plot(x values,y values... [, plotstyle]) x values, y values: vectors of same dimension keep objects: hold [on off] Color and style of lines can be set by plotstyle: colors k black r red b blue m magenta c cyan y yellow g green w white lines and markers - solid o circle -- dashed * asteriks : dotted + plus sign. point x cross Example: plot(1:0.1:2*pi,sin(1:0.1:2*pi), r-. ) Dipl.-Ing. Ulrich Wohlfarth 8

2D graphics: specific plot commands Stairstep: Discrete: stairs([x,] y... [, plotstyle]) stem([x,] y... [, plotstyle]) logarithmic: loglog(x, y... [, plotstyle]) x axis: semilogx(x, y... [, plotstyle]) y axis: semilogy(x, y... [, plotstyle]) Functions: explicite function: fplot(f, range) implicite function: ezplot(f(x, y), range) parametrically def. curve: ezplot(f 1, f 2, range) Dipl.-Ing. Ulrich Wohlfarth 9

3D graphics: plot commands Points/Lines: Surface: Mesh: plot3(x, y, z... [, plotstyle]) surf(x, y, z... [, color]) mesh(x, y, z... [, color]) Waterfall: waterfall(x, y, z... [...]) Contour: contour(x, y, z... [...]) x, y, z: matrices of same dimension [X,Y] = meshgrid(x vec, y vec) generates matrices of correct dimension from vectors x vec and y vec Dipl.-Ing. Ulrich Wohlfarth 10

3D graphics: Labelling, viewpoint and colors Scaling: axis([x...,y...,z min,z max]) Labelling of z Achse: zlabel(string) Show box: box [on off] Change viewpoint: view(azimuth, elevation) Colors: Colormap: colormap(name) Scalng: caxis(color min, color max) Online help: graph2d, graph3d, specgraph Dipl.-Ing. Ulrich Wohlfarth 11

Import, export and printing of graphics Figure print: print -fnumber save: print -fnumber -ddevice f ilename saveas(h, f ilename, fig ) Output options (format, driver): -ddevice Formats: PS, EPS, TIFF, HPGL, JPEG,... Windows: EMF, BMP, printer driver, clipboard Image: read: A = imread(f ilename,f ormat) generate: imwrite(a,f ilename,f ormat) plot: image(a) Dipl.-Ing. Ulrich Wohlfarth 12

GUI Graphical User Interface Graphical User Interface use of object properties of MATLAB graphics programming using GUIDE or by hand Dipl.-Ing. Ulrich Wohlfarth 13