discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] #include "vector.hpp"


From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] #include "vector.hpp"
Date: Tue, 23 Jun 2015 20:52:27 -0400

On Tue, Jun 23, 2015 at 8:15 PM, dcardona <address@hidden> wrote:
Hello!

I think I already found a way to do this, but now I'm getting this error:
"error: a function-definition is not allowed here before ‘{’ token"
In these parts of the code :

Vector txyz(4);
void initialize()
 {
     txyz[0] = 0.0;
    txyz[1] = 0.0;
    txyz[2] = 1.0;
    txyz[3] = 0.0;
}

void PrimercruceenB()
 {
        char B;
        char Bi;
        double w = sqrt(b * (r - 1));
        while (txyz[1] < w){ // Cruce con plano  B en x

        RK4Step(txyz, dt);
        }
        // Aqui ya tengo el primer valor de x cruzando al plano B

        if (txyz[2] >= w) { // Cruce con plano B en y
                Bi = '3';
        }
        else {
                while ( txyz[2] < w) {
                        RK4Step(txyz, dt);
                }
                if (txyz[1] >= w) {
                  Bi = '3';
                }
        }
}

Vector f(Vector txyz)
{
        double t = txyz[0];
        double x = txyz[1];
        double y = txyz[2];
        double z = txyz[3];
        Vector f(4);
        f[0] = 1;
    f[1] = - sigma * x + sigma * y;
    f[2] = - x * z + r * x - y;
    f[3] = x * y - b * z;
    return f;
}

I don't know why I'm getting this error. Doesn't these functions can be
recognize by GNU Radio?

Thank you.


Once again, this is a C++ coding issue. I don't even see any GNU Radio code in here.

Tom


reply via email to

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