[Top][All Lists]

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

Re: need help

From: Jaroslav Hajek
Subject: Re: need help
Date: Tue, 16 Feb 2010 11:00:00 +0100

On Tue, Feb 16, 2010 at 8:03 AM,  <address@hidden> wrote:
> Dear Sir,
> I am new user for octave GNU. I don't know how to calculate phase margin
> using extrapolation for a bode plot with if or for loop. previously i done
> this in MATLAB and loop code is
> for i=1:1:30
> if((mag(i)>1) & (mag(i+1)<1))
> j=i
> y2=mag(i);
> y1=mag (i+1)
> x2=w(i)
> x1=w(i+1)
> end
> end
> how this will do in octave. could you please help me out?

This is a valid code in Octave. The same goal can be achieved more
efficiently using find, but it should work.

RNDr. Jaroslav Hajek, PhD
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic

reply via email to

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