Lab 1 Tutorial

15
Lab 1 Tutorial Dr. Sasanthi Peiris ENGR 103 Computer-Aided Analysis Tools for Engineers

description

rrg

Transcript of Lab 1 Tutorial

Lab 1 Tutorial

Dr. Sasanthi Peiris

ENGR 103 Computer-Aided Analysis Tools for

Engineers

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

Task 1

Task 2

Task 3

Answer: L = 51 and E = 1.48

starting valueending value

Step size

Task 4

Task 5

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

Task 5 Contd.

Task 6x

Task 6 Contd.

Task 7

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

Task 8

Task 8 Contd.

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

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.

Task 8 Contd.- correct the error