Save data from for-loop and their use
Show older comments
Hello,
I have the following problems. I have matrices: SatTrDatax_Norm (4X200) and SatTrDatay_Norm (4x50). I want to apply wavelet decomposition(wavedec) to each line separately. Next, I try to save the results to new matrices (C1,L1,C2,L2). Use for-loop but save the last value in C1,L1,C2,L2.How do I store all values resulting from the for-loop? The second problem concerns reconstruction (wrcoeff). The matrices C1,L1,C2,L2 according to the documentation must be a vector. How is this going to be done? Your help is invaluable.
for i=1:4
[C1,L1]=wavedec(SatTrDatax_Norm(i,:),3,'db1');
[C2,L2]=wavedec(SatTrDatay(i,:),3,'db1');
end
AppTrDxNorm_Sat=wrcoef('a',C1,L1,'db5',3);
D1TrDxNorm_Sat=wrcoef('d',C1,L1,'db5',1);
D2TrDxNorm_Sat=wrcoef('d',C1,L1,'db5',2);
D3TrDxNorm_Sat=wrcoef('d',C1,L1,'db5',3);
%
AppTrDySat=wrcoef('a',C2,L2,'db5',3);
D1TrDySat=wrcoef('d',C2,L2,'db5',1);
D2TrDySat=wrcoef('d',C2,L2,'db5',2);
D3TrDySat=wrcoef('d',C2,L2,'db5',3);
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!