Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • lts2/matrix-analysis-2025
  • magbi/matrix-analysis-2025
  • ibelhadj/matrix-analysis-2025
  • aboujaou/matrix-analysis-2025
  • wazen/matrix-analysis-2025
  • kuyumcu/matrix-analysis-2025
6 results
Show changes
Commits on Source (16)
Showing
with 11328 additions and 4 deletions
......@@ -26,7 +26,7 @@ Follow the below instructions to install it and create an environment for the co
1. Download the Python 3.x installer for Windows, macOS, or Linux from <https://conda.io/miniconda.html> and install with default settings. For windows, it is advised to use the the Windows Subsystem for Linux (WSL) which allows you to run all Linux commands and applications within Windows. In order to use it, you need to install it first, e.g. for [Ubuntu](https://ubuntu.com/wsl) (but other Linux distributions are available as well). Once installed, open the Ubuntu WSL and proceed with Miniconda installation for Linux and create the environment.
Skip this step if you have conda already installed.
* macOS: double-click on `Miniconda3-latest-MacOSX-x86_64.pkg` or run `bash Miniconda3-latest-MacOSX-x86_64.sh` in a terminal.
* macOS: double-click on `Miniconda3-latest-MacOSX-x86_64.pkg` or run `bash Miniconda3-latest-MacOSX-x86_64.sh` in a terminal. Use the `MacOSX-arm64` file on newer Macs with M1/M2/M3 chips.
* Linux: run `bash Miniconda3-latest-Linux-x86_64.sh` in a terminal or use your package manager.
1. Open a terminal.
Windows: open the Anaconda Prompt from the Start menu.
......@@ -56,8 +56,8 @@ Every time you want to work, do the following:
[conda-forge]: https://conda-forge.org
[test_install]: https://nbviewer.org/urls/gitlab.epfl.ch/lts2/matrix-analysis-2025/-/raw/master/test_install.ipynb/%3Fref_type%3Dheads
### Binder/Colab...
You can also run those notebooks using other online services such as [binder](https://mybinder.org) or [Google colab](https://colab.research.google.com/).
### Binder
You can also run those notebooks using other online services such as [binder](https://mybinder.org).
Clicking on the badge below will open this repository in binder.
......
......@@ -11,4 +11,5 @@ dependencies:
- scikit-image=0.24.0
- scikit-learn=1.5.1
- scipy=1.14.1
\ No newline at end of file
- pip:
- otter-grader==6.1.0
This diff is collapsed.
import pywt
import matplotlib.pyplot as plt
from scipy.interpolate import griddata
def plot_haar_coeffs(data, title, levels=5):
"""Show dwt coefficients for given data ."""
w = pywt.Wavelet('haar')
a = data
ca = []
cd = []
mode = pywt.Modes.sp1DWT = 1
for i in range(levels):
(a, d) = pywt.dwt(a, w, mode)
ca.append(a)
cd.append(d)
fig = plt.figure()
ax_main = fig.add_subplot(len(ca) + 1, 1, 1)
ax_main.set_title(title)
ax_main.plot(data)
ax_main.set_xlim(0, len(data) - 1)
for i, x in enumerate(ca):
ax = fig.add_subplot(len(ca) + 1, 2, 3 + i * 2)
ax.plot(x, 'r')
ax.set_ylabel("A%d" % (i + 1))
ax.set_xlim(0, len(x) - 1)
for i, x in enumerate(cd):
ax = fig.add_subplot(len(cd) + 1, 2, 4 + i * 2)
ax.plot(x, 'g')
ax.set_ylabel("D%d" % (i + 1))
# Scale axes
ax.set_xlim(0, len(x) - 1)
ax.set_ylim(min(0, 1.4 * min(x)), max(0, 1.4 * max(x)))
fig.subplots_adjust(left=0.2, right=1.5, top=1.9, bottom=0.1)
\ No newline at end of file
This diff is collapsed.
exercises/week03/images/pocs.png

76.9 KiB

This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
File added
This diff is collapsed.
This diff is collapsed.
solutions/week03/images/pocs.png

76.9 KiB

This diff is collapsed.
This diff is collapsed.