i have a 2 very large matrix, i dont want to put the matrix in main coding file, is their any way to make a seperate file for those input matrix and execute with the main file?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
matrix are inputs. also please explain function calling in separate .m file
if true
bdata=[ 1 0 0
2 100 60
3 90 40
4 120 80
5 60 30
6 60 20
7 200 100
8 200 100
9 60 20
10 60 20
11 45 30
12 60 35
13 60 35
14 120 80
15 60 10
16 60 20
17 60 20
18 90 40
19 90 40
20 90 40
21 90 40
22 90 40
23 90 40
24 420 200
25 420 200
26 60 25
27 60 25
28 60 20
29 120 70
30 200 600
31 150 70
32 210 100
33 60 40 ];
end
if true
ldata=[ 1 2 0.992 0.047
2 3 0.4930 0.2511
3 4 0.3660 0.1844
4 5 0.3811 0.1941
5 6 0.8190 0.7070
6 7 0.1872 0.6188
7 8 0.7114 0.2351
8 9 1.0300 0.74
9 10 1.0440 0.74
10 11 0.1966 0.065
11 12 0.3744 0.1238
12 13 1.4680 1.155
13 14 0.5416 0.7129
14 15 0.5910 0.526
15 16 0.7463 0.545
16 17 1.2890 1.721
17 18 0.7320 0.574
2 19 0.1640 0.1565
19 20 1.5042 1.3554
20 21 0.4095 0.4784
21 22 0.7089 0.9373
3 23 0.4512 0.3083
23 24 0.8980 0.7091
24 25 0.8960 0.7011
6 26 0.2030 0.1034
26 27 0.2842 0.1447
27 28 1.059 0.9337
28 29 0.8042 0.7006
29 30 0.5075 0.2585
30 31 0.9744 0.963
31 32 0.3105 0.3619
32 33 0.341 0.5302 ];
end
0 commentaires
Réponse acceptée
Youssef Khmou
le 1 Mai 2013
hi, you can save them separately and call one of them when you have to :
save data1 bdata
save data2 ldata
Now you have two file data1.mat and data2.mat that you can call in your program
load data1 % or load data2
Plus de réponses (0)
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!