function mat2xdr(matfile,xdrfile)

% MAT2XDR	Conversion from MAT file to XDR file
%   MAT2XDR MATFILE XDRFILE converts the MAT-file MATFILE to an XDR file
%   XDRFILE.
%
% [+GenLib General Purpose Library+] Swiss Plasma Center EPFL Lausanne 2022. All rights reserved.

list = whos('-file',matfile);
CMD__ = ['savexdr(''' xdrfile ''''];
for k = 1:length(list)
 CMD__ = [CMD__ ',' list(k).name];
end
CMD__ = [CMD__ ')'];
load(matfile)
eval(CMD__)
