help-octave
[Top][All Lists]
Advanced

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

Re: 'handle' function is not yet implemented in Octave workaround?


From: RT
Subject: Re: 'handle' function is not yet implemented in Octave workaround?
Date: Wed, 3 Dec 2014 05:45:21 -0500

Thanks

On Dec 3, 2014 4:03 AM, "Andreas Weber" <address@hidden> wrote:
On 02.12.2014 18:06, RT wrote:
> |Greetings I'm running into an error on octave 3.8.1 with the code below is there a workaround
> warning: the 'handle' function is not yet implemented in Octave
>
> Code below:
>
> |
> r = @(t) exp(.306349*t);
> h = plot(0,0,'Color','b','LineWidth',2);
> h = handle(h);
> axis(50*[-1 1 -1 1]);
> grid on
> n = 1;
> for t = 0 : .1 : 5*pi
>     x(n) = r(t) .* cos(t);
>     y(n) = r(t) .* sin(t);
>     h.XData(n) = x(n);
>     h.YData(n) = y(n);
>     n = n + 1;
> end|

You don't need handle (not implemented) and the for-loop here:

r = @(t) exp(.306349 * t);
t = 0:0.1:5*pi;
x = r (t) .* cos (t);
y = r (t) .* sin (t);
plot(x, y, 'Color','b','LineWidth',2);
axis(50*[-1 1 -1 1]);
grid on

-- Andy

reply via email to

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