Skip to content
Snippets Groups Projects
Commit ae5d26c7 authored by Olivier Sauter's avatar Olivier Sauter
Browse files

minor debugging with varargin and out cell definitions

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@1824 d63d8f72-b253-0410-a779-e742ad2e26cf
parent 7ec5b296
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,7 @@
% [zmag,error]=loadTCVdata(shot,'zmag');
%
varargout=cell(1,1);
varargout{1}=cell(1,1);
% all keywords and corresponding case to run below
TCVkeywrdall=[{'Ip'} {'zmag'} {'rmag'} {'sxr'} {'sxR'} {'ece'}];
......@@ -83,12 +83,12 @@ if nargineff>=3
for i=1:length(varargin)
if ~isempty(varargin{i})
if isstruct(varargin{i})
zmag=varargin{1};
zmag=varargin{i};
elseif size(varargin{i},2)>2
status=varargin{i};
else
i1 =varargin{2}(1);
i2 =varargin{2}(2);
i1 =varargin{i}(1);
i2 =varargin{i}(2);
end
end
end
......@@ -139,7 +139,7 @@ switch TCVkeywrdcase{index}
[fans,vangle,xchord,ychord,aomega,angfact]=xtomo_geometry(1,icamera);
% calculating intersection of the view lines with magnetic axis
if strcmp(data_type,'sxR')
varargout={VsxrTCVradius(zmag.data,xchord,ychord)};
varargout{1}={VsxrTCVradius(zmag.data,xchord,ychord)};
t_1=zmag.t(1);
t_2=zmag.t(end);
else
......@@ -173,7 +173,7 @@ switch TCVkeywrdcase{index}
trace.data=TE_ECE(a:b,:);
radius.t=trace.t;
radius.data=R(a:b,:);
varargout={radius};
varargout{1}={radius};
error=0;
case 'MPX'
......@@ -191,7 +191,7 @@ switch TCVkeywrdcase{index}
end
end
[xchord,ychord]=mpx_geometry;
varargout={VsxrTCVradius(zmag.data,xchord,ychord)};
varargout{1}={VsxrTCVradius(zmag.data,xchord,ychord)};
error=0;
otherwise
......@@ -199,6 +199,3 @@ switch TCVkeywrdcase{index}
disp(['this data_type' ' ' data_type ' ' 'not yet programmed in loadTCVdata, ask Andrea.Scarabosio@epfl.ch']);
end
......@@ -81,7 +81,7 @@ if (nargineff>=4 & ~isempty(varargin{2})); machine=varargin{2}; end
if nargineff<=4
eval(['[trace,error,varargout] = load' machine 'data(shot,data_type);']);
else
eval(['[trace,error,varargout] = load' machine 'data(shot,data_type,varargin(3:end));']);
eval(['[trace,error,varargout] = load' machine 'data(shot,data_type,varargin{3:end});']);
end
% PLOT DATA (if required)
......
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