Spring 09 WS 4

Spring 09 WS 4 - ENG EK 127 Worksheet 4 Name: _...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
ENG EK 127 Worksheet 4 Name: ____________________________________________________ Instructions: Make sure that your Current Directory is set correctly! The minimum set Problems 1-9. 1. The input function can be used to enter a vector, e.g. >> vec = input('Enter a vector: ') Enter a vector: 4:7 vec = 4 5 6 7 Experiment with this, and find out how the user can enter a matrix. 2. Write a script that assigns values for the x coordinate and then y coordinate of a point, and then plots this using a green +. %Create cordinate variables and plot a green '+' x= 10; y = 20; plot(x,y, 'g+' ) 3. In the Command Window, create x and y data points by creating x and y vectors. Now, use the bar function instead of plot to get a bar chart instead. %Create cordinate variables using x and y vectors x= 1:3; y = [6 5 4]; bar(x,y) 4. Plot sin(x) for x values ranging from 0 to π (in separate Figure Windows): using 10 points in this range %This script plots sin(x) ranging from 0 to Pi x = 0: pi/10 : pi;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/19/2010 for the course EK 211 taught by Professor Attaway during the Spring '10 term at BU.

Page1 / 4

Spring 09 WS 4 - ENG EK 127 Worksheet 4 Name: _...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online