[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to print this function?
From: |
Max Brister |
Subject: |
Re: How to print this function? |
Date: |
Tue, 22 May 2012 11:11:07 -0600 |
On Tue, May 22, 2012 at 10:58 AM, lib1 <address@hidden> wrote:
> Hi,
>
> This is a beginner question, but can't seem to figure this out.
>
> Please consider:
>
> t = [-1:0.1:1;]
>
> f = ( 1 + t ) / ( 1 - t);
>
> plot (t, f);
>
>
> I'd like to see the behavior of f function regarding t values, but all I get
> is some point.
> How should I do this?
By default octave does matrix math. So, (1 + t) / (1 - t) does matrix
division resulting in a single scalar value. It looks like you really
want to do element-wise division, this is achieved through adding a
dot in front of the division operator like:
f = (1 + t) ./ (1 - t);
Max Brister
- How to print this function?, lib1, 2012/05/22
- Re: How to print this function?,
Max Brister <=
- Re: How to print this function?, lib1, 2012/05/22
- Re: How to print this function?, Przemek Klosowski, 2012/05/22
- Re: How to print this function?, marco atzeri, 2012/05/22
- Re: How to print this function?, Max Brister, 2012/05/22
- Re: How to print this function?, marco atzeri, 2012/05/22