Skip to content
Snippets Groups Projects
Commit 1088fc1a authored by Matteo Vallar's avatar Matteo Vallar Committed by Olivier Sauter
Browse files

the nbi current fraction is now normalized to 1

parent f659967f
Branches
Tags
1 merge request!59Done: fix nbi current fraction ids
Pipeline #83092 passed
......@@ -90,7 +90,7 @@ for iunit=1:nb_units
if ~isempty(p_frac.data) && size(p_frac.data,2)>=3
ids_nbi.unit{iunit}.beam_power_fraction.data = p_frac.data(:,1:3)'*0.01;
i_frac = p_frac.data(:,1:3).*repmat([1 2 3],size(p_frac.data,1),1); % to be compatible with older matlab version .*[1 2 3] not ok
i_frac = i_frac.*1./repmat(sum(i_frac),size(p_frac.data,1),1);
i_frac = i_frac.*1./repmat(sum(i_frac,2), 1, 3);
else
ids_nbi.unit{iunit}.beam_power_fraction.data = p_frac.data;
i_frac = p_frac.data;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment