Lecture 1: Introduction

Lecture series based on the text: Essential MATLAB for Engineers and Scientists By Hahn & Valentine The Command Window on the right is the main panel where you interact with MATLAB. You key (or type) and commands after the prompt ; MATLAB executes the commands and displays results (if requested). Some commonly used tools and commands: (up arrow) returns last command input, can be repeated clc – clears the screen whos – shows list of variables clear – clears variables | Lecture 1: Introduction Lecture series based on the text: Essential MATLAB for Engineers and Scientists By Hahn & Valentine © 2007 Daniel Valentine. All rights reserved. Published by Elsevier. Email: bttu@ MATLAB desktop Command Window Command History Window Workspace Window Current Directory Window Start Button Command Window The Command Window on the right is the main panel where you interact with MATLAB. You key (or type) and commands after the prompt >>; MATLAB executes the commands and displays results (if requested). Some commonly used tools and commands: (up arrow) returns last command input, can be repeated clc – clears the screen whos – shows list of variables clear – clears variables Evaluation of MATLAB HANDS-ON with MATLAB Type >> 2+3 into the Command Window >> clc >> whos Throughout the lecture, yellow text indicates what you should type into MATLAB. Command History Window The Command History Window logs all of the commands you enter in MATLAB. It should have logged 2+3. Use the Command History Window to reenter 2+3 in the command window (use copy-and- paste or double click on 2+3). This is useful to retrieve past commands. Use “Shift” key to select multiple lines. Arithmetic with MATLAB Let us explore by doing exercises: >> 3–2 >> 3*2 >> 3/2 >> 3\2 >> 3^2 >> 2/0 >> 0/2 >> 3*Inf Algebraic-numeric computations Let us explore by doing exercises: >> a = 3 >> b = 2 >> a – b >> a / b >> a^2 >> c = a * b >> d = c^(b+1) >> who Hiding Output Let us explore by doing exercises: >> clear; clc >> whos >> a = 3; >> b = 2; >> c = a * b; >> d = c^(b+1); >> who >> % a, b, c, d are in workspace >> a, b, c, d Plot y versus x . | Lecture 1: Introduction Lecture series based on the text: Essential MATLAB for Engineers and Scientists By Hahn & Valentine © 2007 Daniel Valentine. All rights reserved. Published by Elsevier. Email: bttu@ MATLAB desktop Command Window Command History Window Workspace Window Current Directory Window Start Button Command Window The Command Window on the right is the main panel where you interact with MATLAB. You key (or type) and commands after the prompt >>; MATLAB executes the commands and displays results (if requested). Some commonly used tools and commands: (up arrow) returns last command input, can be repeated clc – clears the screen whos – shows list of variables clear – clears variables Evaluation of MATLAB HANDS-ON with MATLAB Type >> 2+3 into the Command Window >> clc >> whos Throughout the lecture, yellow text indicates what you should type into MATLAB.

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.