<commit_before>//
//
//

#include <stdio.h>
#include <math.h>

#include "liquid.h"

#define DEBUG_FILENAME "firpfbch_analysis_example.m"

int main() {
    // options
    unsigned int num_channels=8;
    float slsl=60;
    unsigned int num_frames=50;  // num frames

    // create objects
    firpfbch c = firpfbch_create(num_channels, slsl, FIRPFBCH_NYQUIST, FIRPFBCH_ANALYZER);

    //firpfbch_print(c);

    FILE*fid = fopen(DEBUG_FILENAME,"w");
    fprintf(fid,"%% %s: auto-generated file\n\n", DEBUG_FILENAME);
    fprintf(fid,"clear all;\nclose all;\n\n");
    fprintf(fid,"num_channels=%u;\n", num_channels);
    fprintf(fid,"num_frames=%u;\n", num_frames);

    fprintf(fid,"x = zeros(1,%u);\n",  num_channels * num_frames);
    fprintf(fid,"y  = zeros(%u,%u);\n", num_channels, num_frames);

    unsigned int i, j, n=0;
    float complex x[num_channels], y[num_channels];

    // create nco: sweeps entire range of frequencies over the evaluation interval
    nco nco_tx = nco_create();
    nco_set_frequency(nco_tx, 0.0f);
    float df = -2*M_PI/(num_channels*num_frames);
    for (i=0; i<num_frames; i++) {

        // generate frame of data
        for (j=0; j<num_channels; j++) {
            nco_cexpf(nco_tx, &x[j]);
            nco_adjust_frequency(nco_tx, df);
            nco_step(nco_tx);
        }

        // execute analysis filter bank
        firpfbch_execute(c, x, y);

        // write output to file<commit_msg>with r771 frequency shift should be positive<commit_after>//
//
//

#include <stdio.h>
#include <math.h>

#include "liquid.h"

#define DEBUG_FILENAME "firpfbch_analysis_example.m"

int main() {
    // options
    unsigned int num_channels=8;
    float slsl=60;
    unsigned int num_frames=50;  // num frames

    // create objects
    firpfbch c = firpfbch_create(num_channels, slsl, FIRPFBCH_NYQUIST, FIRPFBCH_ANALYZER);

    //firpfbch_print(c);

    FILE*fid = fopen(DEBUG_FILENAME,"w");
    fprintf(fid,"%% %s: auto-generated file\n\n", DEBUG_FILENAME);
    fprintf(fid,"clear all;\nclose all;\n\n");
    fprintf(fid,"num_channels=%u;\n", num_channels);
    fprintf(fid,"num_frames=%u;\n", num_frames);

    fprintf(fid,"x = zeros(1,%u);\n",  num_channels * num_frames);
    fprintf(fid,"y  = zeros(%u,%u);\n", num_channels, num_frames);

    unsigned int i, j, n=0;
    float complex x[num_channels], y[num_channels];

    // create nco: sweeps entire range of frequencies over the evaluation interval
    nco nco_tx = nco_create();
    nco_set_frequency(nco_tx, 0.0f);
    float df = 2*M_PI/(num_channels*num_frames);
    for (i=0; i<num_frames; i++) {

        // generate frame of data
        for (j=0; j<num_channels; j++) {
            nco_cexpf(nco_tx, &x[j]);
            nco_adjust_frequency(nco_tx, df);
            nco_step(nco_tx);
        }

        // execute analysis filter bank
        firpfbch_execute(c, x, y);

        // write output to file
{'fraction_non_alphanumeric': 0.14566115702479338, 'fraction_numerical': 0.009297520661157025, 'mean_word_length': 3.091549295774648, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2120620', 'n_tokens_mistral': 1124, 'n_tokens_neox': 1078, 'n_words': 225}