% % @file prof.m % % @brief % % @copyright % Copyright (©) 2021 EPFL (Ecole Polytechnique Fédérale de Lausanne) % SPC (Swiss Plasma Center) % % futils is free software: you can redistribute it and/or modify it under % the terms of the GNU Lesser General Public License as published by the Free % Software Foundation, either version 3 of the License, or (at your option) % any later version. % % futils is distributed in the hope that it will be useful, but WITHOUT ANY % WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS % FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. % % You should have received a copy of the GNU Lesser General Public License % along with this program. If not, see . % % @authors % (in alphabetical order) % @author Trach-Minh Tran % % % Get data from data sets % time=hdf5read('prof.h5','/profile_1d/time'); x=hdf5read('prof.h5','/profile_1d/xgrid'); phi=hdf5read('prof.h5','/profile_1d/phi'); % % Attributes % attr=hdf5read('prof.h5','/title'); title_ann=attr.Data; attr=hdf5read('prof.h5','/profile_1d/time/title'); time_ann=attr.Data; attr=hdf5read('prof.h5','/profile_1d/xgrid/title'); x_ann=attr.Data; attr=hdf5read('prof.h5','/profile_1d/phi/title'); phi_ann=attr.Data; figure nsteps=size(time,2) hold on for i = 1:10 plot(x,phi(:,i)); end xlabel(x_ann) ylabel(phi_ann) title(title_ann) figure [c,h]=contourf(double(time(1:10)), double(x), double(phi(:,1:10))); clabel(c,h); colorbar xlabel(time_ann) ylabel(x_ann) title(phi_ann)