[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: variable and plot
From: |
Tatsuro MATSUOKA |
Subject: |
Re: variable and plot |
Date: |
Wed, 11 Apr 2018 13:21:54 +0900 (JST) |
---- Original Message -----
>From: Nicholas Jankowski
>To: Patrick Dupre
>Cc: Help GNU Octave <
>Date: 2018/4/11, Wed 02:52
>Subject: Re: variable and plot
>
>
>On Tue, Apr 10, 2018 at 1:18 PM, Patrick Dupre wrote:
>
>Very good,
>>
>>Then, how can I get a vector in output?
>>By the way,
>>sin(1) works as well as
>>plot (x, sin (x))
>>How can I obtain the same behavior ?
>>
>>
>
>your function needs to output a vector. quad does not. quadv does, but it
>tends to be a bit less accurate. if x = [1:1:10], then look at the output of
>sin(x). plot just works with the output of the function.
>
In the case, use arrayfun shown in the below
https://octave.org/doc/interpreter/Function-Application.html#index-arrayfun
HTH
Tatsuro