Download presentation
Presentation is loading. Please wait.
Published byJames Arnold Modified over 8 years ago
1
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 1 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Bruce Mayer, PE Licensed Electrical & Mechanical Engineer BMayer@ChabotCollege.edu Engr/Math/Physics 25 Tutorial-1 Intro Videos Build HW File
2
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 2 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods First ENGR25 Tutorial MATLAB Video Tutorials http://www.mathworks.com/academia/stud ent_center/tutorials/launchpad.htmlhttp://www.mathworks.com/academia/stud ent_center/tutorials/launchpad.html –http://www.mathworks.com/videos/getting- started-with-matlab-68985.html (6 min) –http://www.mathworks.com/videos/writing-a- matlab-program-69023.html (6 min) –http://www.mathworks.com/videos/matlab/using -basic-plotting-functions.html (6 min) –http://www.mathworks.com/videos/simulink/getti ng-started-with-simulink.html (3.5 min min)http://www.mathworks.com/videos/simulink/getti ng-started-with-simulink.html
3
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 3 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods First ENGR25 Tutorial MATLAB Video Tutorials http://www.mathworks.com/academia/stud ent_center/tutorials/launchpad.htmlhttp://www.mathworks.com/academia/stud ent_center/tutorials/launchpad.html –http://www.mathworks.com/videos/matlab/creati ng-a-basic-plot-interactively.html (6 min)http://www.mathworks.com/videos/matlab/creati ng-a-basic-plot-interactively.html See Also Day1_HW_Build_Tutorial_1201.m
4
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 4 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods HW File MSWord Starting Point
5
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 5 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods HW00 P01 Trapezoid Area Consider an ARBITRARY Trapezoid a & b are BASE Lengths h is the Height The Area of this form is the AVERAGE OF THE BASE-LENGTHS times the HEIGHT The ALGEBRAIC formula for the Area, A
6
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 6 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods HW00 P01 Trapezoid Area Ask user to enter a, b, h Calc & Display Trapezoid area
7
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 7 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods HW00 P03 Quadratic Eqn Ask user to enter a, b, c for Quadratic Eqn shown below Display Solution
8
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 8 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods HW00 P07 CoSine City Find Difference in MATLAB CoSine Calcs
9
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 9 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Plot This Function Where –T Temperature (°C) –t time (minutes) –t 0 = 3.3 minutes For 1 t 9
10
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 10 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods HW00 P15 SimuLink City Solve the ODE below using the Icon Based Programming Environment, SimuLink
11
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 11 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods HW00 P23 MuPAD Manipulation For Find Using MuPAD
12
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 12 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods HW00 P31 Excel Exposure Compare Industrial Machine Tool Products from Gladiator Engineered Systems (GES) and the Competition Thru the use of an Excel RADAR Chart
13
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 13 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Windows ClipBoard Copy MATLAB provides a Very Nice Utility in which a Plot is sent to the MSWindows ClipBoard for Subsequent Pasting into Other Applications To Save to the ClipBoard 1.Select Copy Options from the Edit menu. The Copying Options page of the Preferences dialog box appears. 2.Complete the fields on the Copying Options page and click OK. 3.Select Copy Figure from the Edit menu.
14
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 14 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Copy to Clipboard Step-1 1.In Figure 1 Window Click Edit → Copy Options...
15
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 15 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Copy to Clipboard Steps 2&3 2.In the Preferences Dialog Box check the Copy- Options Boxes as you see Fit 3.Close the Dialog Box
16
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 16 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Copy to Clipboard – Steps 4&5 4.In the Figure Window use File → Copy Figure to send the plot to the clipboard 5.Paste the plot image into PowerPoint, Word, etc.
17
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 17 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods The Copy Figure export
18
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 18 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Copy SimuLink Model A SimuLink Model
19
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 19 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods The Copied Model
20
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 20 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Copy MuPAD Symbolic Math A MuPAD WorkBook Select Content
21
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 21 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Copy MuPAD Symbolic Math In MSWord use: PASTE SPECIAL FORMATED TEXT (RTF)
22
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 22 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Copied MuPAD WorkBook
23
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 23 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods 3x3 from ENGR43 For The DC Linear Circuits We Will need to Solve Systems Of Algebraic Equations
24
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 24 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods First ENGR25 Tutorial –Additional Videos Useful in the future http://www.mathworks.com/videos/matlab/importing- data-from-files.html (HW5, 7min) http://www.mathworks.com/videos/matlab/importing- data-from-files.html http://www.mathworks.com/products/simulink/demos. html?BB=1 (SimuLink) http://www.mathworks.com/products/simulink/demos. html?BB=1 http://www.mathworks.com/videos/simulink/getting-started-with- simulink.html (4 min) http://www.mathworks.com/videos/simulink/getting-started-with- simulink.html http://www.mathworks.com/videos/simulink/visualizing- simulation-results.html (4 min) http://www.mathworks.com/videos/simulink/visualizing- simulation-results.html HW Presentation Save MATLAB work to MSWord file Trapezoid area, 3x3 Eqn System, cosh calculation, plot y = ln(t+.02)·sin(1.3t)
25
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 25 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Additional Useful Videos http://www.mathworks.com/products/matlab/demos.html
26
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 26 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Day1 demo Script
27
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 27 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods DeskTop Recovery to UnScramble the DeskTop
28
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 28 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods All Done for Today Please Try Using MATLAB Let’s do MQ-00b
29
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 29 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods A Trapezoid t b h A = [Hgt] x [Avg-Width]
30
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 30 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Cosh City >> fplot('cosh', [-2 2]) >> grid
31
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 31 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods 3x3 from ENGR43 For The DC Linear Circuits We Will need to Solve Systems Of Algebraic Equations
32
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 32 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Example Problem 1-21 Plot This Function Where –T Temperature (°C) –t time (minutes) For: 1 t 3
33
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 33 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Prob 1-21 >> t = [1:.01:3]; >> T = 6*log(t) - 7*exp(0.2*t); >> plot(t,T, 'LineWidth', 3) >> xlabel('t (Sec)') >> ylabel('T (deg C)') >> title('Temp vs time') >> grid
34
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 34 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Bruce Mayer, PE Licensed Electrical & Mechanical Engineer BMayer@ChabotCollege.edu Engr/Math/Physics 25 Appendix
35
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 35 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Example Demo Session >> %Use MATLAB As Calculator >> 17*19 ans = 323 >> 77/19 -4.3 ans = -0.2474 >> 64^(1/3) + 32^0.2 ans = 6 >> (7+11)*2.5 ans = 45 >> L = 14.4 L = 14.4000 >> W = 13.3 W = 13.3000 >> Area = L*W Area = 191.5200
36
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 36 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Prob 1-21 Command Script From the Command Window >> t = [1:0.02:3]; >> T = 6*log(t) - 7*exp(0.2*t); >> plot(t,T), xlabel('time (min)'),ylabel('Temperature (°C)'), title('Problem 1-21'), grid
37
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 37 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Prob 1-22 Plot
38
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 38 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
39
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 39 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods The Copied MuPAD WorkBook
40
BMayer@ChabotCollege.edu ENGR-25_MATLAB_OverView-1.ppt 40 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods System, Directory, File Cmnds CommandDescription pwd Displays the current directory cd dirname Changes the current directory to dirname rmpath dirname Removes the directory dirname from the search path. what Lists the MATLAB-specificfiles found in the current working directory. Most data files and other non-MATLAB files are not listed. Use dir to get a list of all files what dirname Lists the MATLAB-specific files in directory dirname
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.