Scripts and User Functions Center

Design a triangular wave function in the frequency domain to analyze FMCW

How to design a triangular wave function in the frequency domain to analyze FMCW with newFASANT tool.

Thumb triangular
double fmcw_4(){
    double BROADBAND = 0.3;

    // first point
    double x0 = 0;
    double y0 = 0;
    // second point
    double x1 = 1./2 * $period;
    double y1 = BROADBAND;
    // third point
    double x2 = $period;
    double y2 = 0;

    if($x < x1) {
		double pending = (y1-y0)/(x1-x0);
		double xOffset = x0;
		double yOffset = y0;
        return pending * ($x-xOffset) + yOffset;
    } else {
		double pending = (y2-y1)/(x2-x1);
		double xOffset = x1;
		double yOffset = y1;
        return pending * ($x-xOffset) + yOffset;
    }
}

Did you find this information useful?

We use cookies on this website to improve your navigation experience on this site. By using this site, you agree to our cookie policy.

I agree