Post Closed as "unclear what you're asking" by Daniel Lichtblau, MarcoB, happy fish, gwr, bbgodfrey
3 added 5 characters in body
source | link

For my masters task I have to doperform a Haar waweletwavelet transform inusing an L1 norm. But mathematica build inMathematica's built-in wavelet library can work only with L2 norm space. I trying I tried to do this.:

haarBasic[t_] := If[0 <= t <= 0.5, 1, If[0.5 <= t <= 1, -1, 0]]
haarBasic[t_] := If[0 <= t <= 0.5, 1, If[0.5 <= t <= 1, -1, 0]]


haarCoeffs[list_List, N_] := 
    Module[{coeffs = Table[c[i][j], {i, N}, {j, 2^i - 1}], minimazed},
      minimazed = NMinimize[
          Sum[Abs[Sum[
             coeffs[[i, j]] haarBasisFunc[t, i, j], {i, N}, {j, 
                2^i - 1}] - list[[t]]], {t, Length@list}], coeffs];
          Print[minimazed[[1]]];
          coeffs /. minimazed[[2]]
   ];

Butbut it does not work. I I have syntax problems and understanding problem. Because all books what I have seen (DaubeschiesDaubechies, for example) has focused on the L2 norm spaces.

Can someone help me?

For my masters task I have to do Haar wawelet transform in L1 norm. But mathematica build in wavelet library can work only with L2 norm space. I trying to do this.

haarBasic[t_] := If[0 <= t <= 0.5, 1, If[0.5 <= t <= 1, -1, 0]]
haarBasic[t_] := If[0 <= t <= 0.5, 1, If[0.5 <= t <= 1, -1, 0]]


haarCoeffs[list_List, N_] := 
    Module[{coeffs = Table[c[i][j], {i, N}, {j, 2^i - 1}], minimazed},
      minimazed = NMinimize[
          Sum[Abs[Sum[
             coeffs[[i, j]] haarBasisFunc[t, i, j], {i, N}, {j, 
                2^i - 1}] - list[[t]]], {t, Length@list}], coeffs];
          Print[minimazed[[1]]];
          coeffs /. minimazed[[2]]
   ];

But it does not work. I have syntax problems and understanding problem. Because all books what I have seen (Daubeschies, for example) has focused on the L2 norm spaces.

Can someone help me?

For my masters task I have to perform a Haar wavelet transform using an L1 norm. But Mathematica's built-in wavelet library can work only with L2 norm space. I tried to do this:

haarBasic[t_] := If[0 <= t <= 0.5, 1, If[0.5 <= t <= 1, -1, 0]]
haarBasic[t_] := If[0 <= t <= 0.5, 1, If[0.5 <= t <= 1, -1, 0]]


haarCoeffs[list_List, N_] := 
    Module[{coeffs = Table[c[i][j], {i, N}, {j, 2^i - 1}], minimazed},
      minimazed = NMinimize[
          Sum[Abs[Sum[
             coeffs[[i, j]] haarBasisFunc[t, i, j], {i, N}, {j, 
                2^i - 1}] - list[[t]]], {t, Length@list}], coeffs];
          Print[minimazed[[1]]];
          coeffs /. minimazed[[2]]
   ];

but it does not work. I have syntax problems and understanding problem. Because all books what I have seen (Daubechies, for example) has focused on the L2 norm spaces.

Can someone help me?

2 added 5 characters in body
source | link

For my masters task I have to do Haar wawelet transform in L1 norm. But mathematica build in wavelet library can work only with L2 norm space. I trying to do this.

haarBasic[t_] := If[0 <= t <= 0.5, 1, If[0.5 <= t <= 1, -1, 0]]
haarBasic[t_] := If[0 <= t <= 0.5, 1, If[0.5 <= t <= 1, -1, 0]]


haarCoeffs[list_List, N_] := 
    Module[{coeffs = Table[c[i][j], {i, N}, {j, 2^i - 1}], minimazed},
      minimazed = NMinimize[
          Sum[Abs[Sum[
             coeffs[[i, j]] haarBasisFunc[t, i, j], {i, N}, {j, 
                2^i - 1}] - list[[t]]], {t, Length@list}], coeffs];
          Print[minimazed[[1]]];
          coeffs /. minimazed[[2]]
   ];

But it does not work. I have syntax problems and understanding problem. Because all books what I have seen (DaubeshiDaubeschies, for example) has focused on the L2 norm spaces. Can

Can someone help me?

For my masters task I have to do Haar wawelet transform in L1 norm. But mathematica build in wavelet library can work only with L2 norm space. I trying to do this.

haarBasic[t_] := If[0 <= t <= 0.5, 1, If[0.5 <= t <= 1, -1, 0]]
haarBasic[t_] := If[0 <= t <= 0.5, 1, If[0.5 <= t <= 1, -1, 0]]


haarCoeffs[list_List, N_] := 
    Module[{coeffs = Table[c[i][j], {i, N}, {j, 2^i - 1}], minimazed},
      minimazed = NMinimize[
          Sum[Abs[Sum[
             coeffs[[i, j]] haarBasisFunc[t, i, j], {i, N}, {j, 
                2^i - 1}] - list[[t]]], {t, Length@list}], coeffs];
          Print[minimazed[[1]]];
          coeffs /. minimazed[[2]]
   ];

But it does not work. I have syntax problems and understanding problem. Because all books what I have seen (Daubeshi, for example) has focused on the L2 norm spaces. Can someone help me?

For my masters task I have to do Haar wawelet transform in L1 norm. But mathematica build in wavelet library can work only with L2 norm space. I trying to do this.

haarBasic[t_] := If[0 <= t <= 0.5, 1, If[0.5 <= t <= 1, -1, 0]]
haarBasic[t_] := If[0 <= t <= 0.5, 1, If[0.5 <= t <= 1, -1, 0]]


haarCoeffs[list_List, N_] := 
    Module[{coeffs = Table[c[i][j], {i, N}, {j, 2^i - 1}], minimazed},
      minimazed = NMinimize[
          Sum[Abs[Sum[
             coeffs[[i, j]] haarBasisFunc[t, i, j], {i, N}, {j, 
                2^i - 1}] - list[[t]]], {t, Length@list}], coeffs];
          Print[minimazed[[1]]];
          coeffs /. minimazed[[2]]
   ];

But it does not work. I have syntax problems and understanding problem. Because all books what I have seen (Daubeschies, for example) has focused on the L2 norm spaces.

Can someone help me?

1
source | link

Find wavelet transform coefficients in L1 norm

For my masters task I have to do Haar wawelet transform in L1 norm. But mathematica build in wavelet library can work only with L2 norm space. I trying to do this.

haarBasic[t_] := If[0 <= t <= 0.5, 1, If[0.5 <= t <= 1, -1, 0]]
haarBasic[t_] := If[0 <= t <= 0.5, 1, If[0.5 <= t <= 1, -1, 0]]


haarCoeffs[list_List, N_] := 
    Module[{coeffs = Table[c[i][j], {i, N}, {j, 2^i - 1}], minimazed},
      minimazed = NMinimize[
          Sum[Abs[Sum[
             coeffs[[i, j]] haarBasisFunc[t, i, j], {i, N}, {j, 
                2^i - 1}] - list[[t]]], {t, Length@list}], coeffs];
          Print[minimazed[[1]]];
          coeffs /. minimazed[[2]]
   ];

But it does not work. I have syntax problems and understanding problem. Because all books what I have seen (Daubeshi, for example) has focused on the L2 norm spaces. Can someone help me?