Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

MATLAB Basics for Mechanical Engineers: Week 2 - Part 1 - Prof. Jagannatha Rao, Study notes of Mechanical Engineering

An overview of the compu&ng platform for mechanical engineers, focusing on the use of matlab. Topics covered include the command window, current folder, workspace, command history, and accessing matlab help. Students are expected to be familiar with logging into cougarnet and blackboard, and the basics of the matlab user interface.

Typology: Study notes

2011/2012

Uploaded on 10/03/2012

renapeteshah
renapeteshah 🇺🇸

10 documents

1 / 13

Toggle sidebar

Related documents


Partial preview of the text

Download MATLAB Basics for Mechanical Engineers: Week 2 - Part 1 - Prof. Jagannatha Rao and more Study notes Mechanical Engineering in PDF only on Docsity! Compu&ng  for  Mechanical   Engineers   Week  2  –  Part-­‐1   Where  we  are  now:     •  At  this  &me,  you  are  able  to:   – Log  in  to  Cougarnet  and  Blackboard   – Par&cipate  in  “Discussions”  in  Blackboard   – Submit  homework  using  Blackboard  Digital   Dropbox   •  At  this  &me,  you  should  also  be  familiar  with   the  basics  of  the  MATLAB  user  interface   What  is  the  “Workspace”   Workspace  shows  all  the  variables  that  we  have  created  in  the  current  MATLAB   session.    Here,  we  have  created  variables  a,b  and  c.   What is the “Command History” Workspace “oax)| ~ |@ New to MATLAB? Watch this Video, see Demos, or read Getting/Started. x| © mf) Sa ® | | Wse. ~ >> a=S.5 Name « Value q a 5.5000 a= b (1,2;3,6] c (1,2,3,5,7,8] 5.5000 >> b=[1,2 ; 3,6] g b= < m. r 1 2 Command History oOo ax 3 é Gs-- 1/25/10 2:56 PM —+ a=5.5 >> c=[1 2357 8] ~b=[1,2 : 3,6] ~e=[1 2357 8] c= 1 2 3 5 7 8 _ |fE >> | ot | TIP:  Create  m-­‐files  from  Command   History   Select  the  commands  in  the  Command  History,  Right  Click,  and  select  “Create  M-­‐File”.     This  creates  a  new  m-­‐file.    This  is  a  great  way  to  try  out  a  few  commands  in  the  command   window,  and  then  collect  them  in  a  m-­‐file.  Very  useful  to  do  homework  problems.   How  to  access  MATLAB  help?   (3)    Type  “doc”  in  the  command  window   Other  review  ques&ons:   •  What  is  a  MATLAB  “m-­‐file”?   •  What  is  the  role  of  semi-­‐colon  “;”?   >>  a=[1:2:5]   a  =    1          3          5   >>  b=[1:2:5];                                     >>  a-­‐b   ans  =      0          0          0   How  to  specify  a  range  of  numbers?   >>a=linspace(0,10,5)   a  =                    0        2.5000        5.0000        7.5000      10.0000   >>  a=[0:2.5:10]   a  =                    0        2.5000        5.0000        7.5000      10.0000  
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved