Top Banner
Lab 1 Tutorial Dr. Sasanthi Peiris ENGR 103 Computer-Aided Analysis Tools for Engineers
15
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Lab 1 Tutorial

Lab 1 Tutorial

Dr. Sasanthi Peiris

ENGR 103 Computer-Aided Analysis Tools for

Engineers

Page 2: Lab 1 Tutorial

IMPORTANT!!!• Follow this tutorial to complete the assigned Lab1 • Comment you name and the section on top of the

script• Include section breaks between each and every task• Run each and every section and make sure there

are no errors before you publish your code• Publish lab1 as a pdf and submit the hardcopy

during the next class (should contain both Matlab commands and the answers)

• There will be a quiz next week based on lab 1

Page 3: Lab 1 Tutorial

Task 1

Page 4: Lab 1 Tutorial

Task 2

Page 5: Lab 1 Tutorial

Task 3

Answer: L = 51 and E = 1.48

starting valueending value

Step size

Page 6: Lab 1 Tutorial

Task 4

Page 7: Lab 1 Tutorial

Task 5

starting value ending value no of data points(use larger number of data points to get a smooth curve)

Page 8: Lab 1 Tutorial

Task 5 Contd.

Page 9: Lab 1 Tutorial

Task 6x

Page 10: Lab 1 Tutorial

Task 6 Contd.

Page 11: Lab 1 Tutorial

Task 7

Answer: x=2, y=-5, z=10

Page 12: Lab 1 Tutorial

Task 8

Page 13: Lab 1 Tutorial

Task 8 Contd.

** Since there is a user input when you publish the code it will give an error.

Page 14: Lab 1 Tutorial

Task 8 Contd.- correct the error

• Download the p_input.m file from the blackboard and save it in your MATLAB working folder

• Change the input to p_input on your script and publish the code.

Page 15: Lab 1 Tutorial

Task 8 Contd.- correct the error