Add a decimated signal: the user enters a number (e.g., 4), and the system should remove signals that are multiples of 4
i dont know the formula for this task. also whats wrong with line 9?
also line 10 shows me in visualstudiocode that there could be some mistake? how exactly? im beginner
switch (opcja)
{
case 1:
if (sygnal != NULL) free(sygnal);
if (zaszumiony != NULL) free(zaszumiony);
if (odfiltrowany != NULL) free(odfiltrowany);
n = pobierzrozmiar();
sygnal = (double*)malloc(n * sizeof(double));
zaszumiony = (double*)malloc(n * sizeof(double));
odfiltrowany = (double*)malloc(n * sizeof(double));
if (sygnal == NULL || zaszumiony == NULL || odfiltrowany == NULL)
{
printf("Blad zaalokowania pamieci!\n");
return -1;
}