Borrar filtros
Borrar filtros

Generation of n_th anonymouse Walsh function

1 visualización (últimos 30 días)
Andrei
Andrei el 27 de Oct. de 2023
I need Walsh functions for fourier approximation of some test function (let it be sinx on interval from -pi to pi). So I need to find n_th Walsh function as a function of x to use in integral for coefficients. Here is my try (I tried to use haddamar matrices)
function y = wal(x,n)
N = 2^n;
H = hadamard(N);
id = fix(x*N -1e-9) + 1;
y = H(N,id);
end
But here is my problem, first of all these functions are not correct. Secondly, they are defined only on (0,1) interval, and I don't know how to generalise in on [-pi,pi]. Thirdly input x is an array, and I need to make anonymous func @(x), but then my id is undefined and function is not working at all

Respuestas (0)

Categorías

Más información sobre Mathematics and Optimization en Help Center y File Exchange.

Productos


Versión

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by