The issue arises because the 'cA' matrix, which contains the approximate coefficients, has incorrect dimensions compared to the 'CA1' matrix, which matches the length of the original signal. To fix this issue, adjust the size of 'CA1' to match that of 'cA'.
Kindly refer to the below documentation of “wavedec” for more details:
I hope this helps!