[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 'handle' function is not yet implemented in Octave workaround?
From: |
Andreas Weber |
Subject: |
Re: 'handle' function is not yet implemented in Octave workaround? |
Date: |
Wed, 03 Dec 2014 10:03:18 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0 |
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