help-octave
[Top][All Lists]
Advanced

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

Re: not be plotted (or not correctly be plotted)on general function, nee


From: Mirek Kwasniak
Subject: Re: not be plotted (or not correctly be plotted)on general function, need help
Date: Mon, 6 Mar 2000 10:11:54 +0100
User-agent: Mutt/1.0.1i

On Thu, Jan 01, 1998 at 03:17:46AM -0800, Eric wrote:
> Dear matlab/octave expert:
>     in simple program
> f=0:0.01:3;
> 
> y=abs((i*2*pi*f+20*pi)/(i*2*pi*f+2*pi));
> 
> plot(f,y)
> 
> I get the error response:
> 
> error:__plt2vv__: vector lengths must match
> 
> error: evaluating if command near line 55, column 3

f=0:0.01:3;
y=abs((i*2*pi*f+20*pi)/(i*2*pi*f+2*pi))
y = 4.6804

:)

It should be:

y=abs((i*2*pi*f+20*pi)./(i*2*pi*f+2*pi));
                      ^^

Read about / and ./ operators.

Mirek



-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.che.wisc.edu/octave/octave.html
How to fund new projects:  http://www.che.wisc.edu/octave/funding.html
Subscription information:  http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------



reply via email to

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