help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to print this function?


From: lib1
Subject: Re: How to print this function?
Date: Tue, 22 May 2012 10:39:41 -0700 (PDT)

Thank you Max!

2012/5/22 Max Brister [via Octave] <[hidden email]>:

> On Tue, May 22, 2012 at 10:58 AM, lib1 <[hidden email]> 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
> _______________________________________________
> Help-octave mailing list
> [hidden email]
> https://mailman.cae.wisc.edu/listinfo/help-octave
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://octave.1599824.n4.nabble.com/How-to-print-this-function-tp4630076p4630077.html
> To unsubscribe from How to print this function?, click here.
> NAML


View this message in context: Re: How to print this function?
Sent from the Octave - General mailing list archive at Nabble.com.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]