- #1

javaistheman

- 8

- 0

## Homework Statement

Plot the direction field of y' = −t(y 2 − .5y − .5) for t=[0,5] and y=[-2,2]. Plot a line every 0.25 units in t and y. The length of each line should be 0.1. Hint: Use line(). Look at the picture to determine the starting and ending coordinates of each line.

## Homework Equations

## The Attempt at a Solution

So I'm a big time beginner in anything related to programming. I'm in a MATLAB class right now with no prior experience at all, and the resources given don't talk about directional fields at all.

I know the line function goes in the format line(X,Y) with X and Y being the coordinates (0, 1 as default). The problem statement says to use this but I'm not sure how to use it to define the length and spacing.

I know there's a plot function also, where you can plug in certain defined lines to make the plot. Once again, I don't know how that ties into a directional field.

I know this website doesn't like when somebody is clueless and not on the verge of figuring the problem out, but all I ask is for some guidance on what the functions are that I'll be using for this. Is there a specific directional field function to use or is it a combination of multiple line functions? Any help would be greatly appreciated.