-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata.py
42 lines (34 loc) · 2.12 KB
/
data.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import numpy as np
import scipy.io
# Posso decidere se caricare i file tramite (scipy.io) o direttamente
# da una loro definizione letterale.
# folder = '2021_10_22'
# M = np.array(scipy.io.loadmat(folder+'/Dataset1_2D_Map.mat').get('Map'))
# U = np.array(scipy.io.loadmat(folder+'/Dataset1_2D_U.mat').get('U'))
# Z = np.array(scipy.io.loadmat(folder+'/Dataset1_2D_Z.mat').get('Z'))
M = np.array([[2, 2, 5],
[2, 4, 4]])
U = np.array([[0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5,
0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5,
0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5],
[0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25,
0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25,
0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25]])
Z = np.array([[0.61659748, 0.75652042, 0.49749538, 1.6372404, 1.7226774,
2.4900081, 3.1795533, 3.3772795, 4.0425195, 4.9749273,
5.3598689, 6.3145103, 7.0069146, 7.0614836, 7.4660307,
7.8943471, 8.555825, 9.4620999, 9.3833436, 10.500449,
10.557889, 11.590932, 11.976205, 12.48852, 13.041897,
13.703166, 14.243143, 14.891593, 15.847494, 16.360403],
[3.0818036, 2.729577, 2.3507465, 2.4029545, 2.8547924,
2.9949001, 3.2593926, 3.3847121, 4.0188575, 4.4006361,
4.9798815, 5.661255, 5.8859889, 6.5552194, 6.4716342,
7.5366574, 8.264737, 8.9332202, 8.861642, 9.6134187,
10.512095, 10.893237, 11.817104, 11.83849, 12.437988,
12.999846, 13.654211, 14.404994, 15.127159, 15.769144],
[4.3682086, 3.886992, 3.2024298, 2.866071, 1.9621785,
1.8909739, 0.89289862, 1.2269304, 1.5091353, 2.0496753,
1.625311, 2.7647265, 2.8173948, 3.8100308, 3.9049983,
4.3899751, 5.5140905, 5.4845039, 6.3783259, 6.8962385,
7.5363392, 7.6425327, 8.1935637, 9.2586658, 10.096671,
9.674948, 10.780746, 11.959056, 12.438097, 12.815845]])