You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 4
Next »
1. Differences inside Matlab interface
1.1.1. 3.4.1. Creating pulse file
>> import imasjava.imas
>> idx=imas_create('ids', 111, 11);
>> disp(idx)
0
>>
1.1.2. 3.4.2. Opening pulse file
>> import imasjava.imas
>> idx=imas_open('ids', 111, 11);
>> disp(idx)
0
>>
1.1.3. 3.4.3. Closing pulse file
>> import imasjava.imas
>> idx=imas_open('ids', 111, 11);
>> disp(idx)
0
>> ret=imas_close(idx)
ret =
0
>>
1.1.4. 3.4.4. Creation of IDS
>> eq=ids_gen('equilibrium')
eq =
ids_properties: [1x1 struct]
vacuum_toroidal_field: [1x1 struct]
time_slice: {[1x1 struct]}
code: [1x1 struct]
time: []
>>
1.1.5. 3.4.5. Saving IDS
>> import imasjava.*
>> idx=imas_create('ids',111,11);
>> eq=ids_gen('equilibrium');
>> eq.ids_properties.comment = 'This is a test IDS';
>> eq.ids_properties.homogeneous_time = 1
eq =
ids_properties: [1x1 struct]
vacuum_toroidal_field: [1x1 struct]
time_slice: {[1x1 struct]}
code: [1x1 struct]
time: []
>> eq.time = [1 2 3 4 5 6 7 8 9 10];
>> for i =1:10
eq.time_slice{i}.time = i;
end
>> ids_put(idx,'equilibrium',eq);
>> imas_close(idx);
>>
1.1.6. 3.4.6. Reading IDS
>> import imasjava.*
>> idx = imas_open('ids', 111, 11);
idx =
0
>> eq=ids_get(idx, 'equilibrium');
>> disp(eq.ids_properties);
comment: 'This is a test IDS'
homogeneous_time: 1
>>