Importing and Exporting Information
The Continuous Wavelet 1-D tool lets you import information from and export information to disk.
You can
Load signals from disk into the Continuous Wavelet 1-D tool.
Save wavelet coefficients from the Continuous Wavelet 1-D tool to disk.
Loading Signals
To load a signal you have constructed in your MATLAB® workspace into the Continuous Wavelet
1-D tool, save the signal in a MAT-file (with extension
mat or other).
For instance, suppose you've designed a signal called warma and
want to analyze it in the Continuous Wavelet 1-D
tool.
save warma warma
The workspace variable warma must be a vector.
sizwarma = size(warma)
sizwarma =
1 1000To load this signal into the Continuous Wavelet 1-D tool, use the menu option File > Load Signal. A dialog box appears that lets you select the appropriate MAT-file to be loaded.
Note
The first one-dimensional variable encountered in the file is considered the signal. Variables are inspected in alphabetical order.
Saving Wavelet Coefficients
The Continuous Wavelet 1-D tool lets you save
wavelet coefficients to disk. The toolbox creates a MAT-file in the current folder
with the extension wc1 and a name you give it.
To save the continuous wavelet coefficients from the present analysis, use the menu option File > Save > Coefficients.
A dialog box appears that lets you specify a folder and filename for storing the coefficients.
Consider the example analysis:
File > Example Analysis > with haar at scales [1:1:64] → Cantor curve.
After saving the continuous wavelet coefficients to the file
cantor.wc1, load the variables into your workspace:
load cantor.wc1 -mat whos
| Name | Size | Bytes | Class |
|---|---|---|---|
coefs | 64x2188 | 1120256 | double array |
scales | 1x64
| 512 | double array |
wname | 1x4 | 8 | char array
|
Variables coefs and scales contain the
continuous wavelet coefficients and the associated scales. More precisely, in the
above example, coefs is a 64-by-2188 matrix, one row for each
scale; and scales is the 1-by-64 vector 1:64.
Variable wname contains the wavelet name.