[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Plot a line passing through two points to the axis
From: |
Victor Semanic |
Subject: |
Re: Plot a line passing through two points to the axis |
Date: |
Fri, 4 Oct 2013 06:36:00 -0700 (PDT) |
From: Mike Miller <address@hidden>
> So you want to extrapolate a line through your two endpoints.
> Something like this?
>
> x = 2 * rand (1, 2) - 1;
> y = 2 * rand (1, 2) - 1;
> xi = [-1 1];
> yi = interp1 (x, y, xi, "extrap");
> plot (xi, yi);
Mike, Indeed, that was exactly what I was looking for!
Thank you for saving me a lot of time.