Skip to content
Snippets Groups Projects
Commit f6cb39bc authored by Francesco Carpanese's avatar Francesco Carpanese Committed by Olivier Sauter
Browse files

Cleaner syntax for looping on fieldnams

parent 1837a849
No related branches found
No related tags found
1 merge request!41Add corsica liuqe complete ids from meq
......@@ -115,19 +115,16 @@ LY.Wk(tt) = a.equilibrium.time_slice{tt}.global_quantities.w_mhd;
end
LY.t = LX.t;
% Put all vector in raw form
flist = fieldnames(LX);
nflist = numel(flist);
for k = 1:nflist
LX.(flist{k}) = v2rw(LX.(flist{k}));
for field = flist
LX.(field{1}) = v2rw(LX.(field{1}));
end
% Put all vector in raw form
flist = fieldnames(LY);
nflist = numel(flist);
for k = 1:nflist
LY.(flist{k}) = v2rw(LY.(flist{k}));
for field = flist
LY.(field{1}) = v2rw(LY.(field{1}));
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment