Index: /trunk/src/imadoc2struct.m
===================================================================
--- /trunk/src/imadoc2struct.m	(revision 214)
+++ /trunk/src/imadoc2struct.m	(revision 215)
@@ -92,5 +92,5 @@
                 end
                 if ~isempty(Dtj)
-                    Dtj=reshape(Dtj'*ones(1,NbDtj),1,NbDtj*numel(Dtj)); %concatene Dti vector NbDti times
+                    Dtj=reshape(Dtj'*ones(1,NbDtj),1,NbDtj*numel(Dtj)); %concatene Dtj vector NbDtj times
                     Dtj=[0 Dtj];
                     Time_val=Time_val*ones(1,numel(Dtj))+ones(numel(Time_val),1)*cumsum(Dtj);% produce a time matrix with Dtj
Index: /trunk/src/proj_field.m
===================================================================
--- /trunk/src/proj_field.m	(revision 214)
+++ /trunk/src/proj_field.m	(revision 215)
@@ -220,5 +220,4 @@
     ProjData.ListVarName={'Y','X','NbVal'};
     ProjData.VarDimName={'nb_points','nb_points','nb_points'};
-    %ProjData.VarDimIndex={[1],[1],[1]}; 
     ProjData.VarAttribute{1}.Role='ancillary';
     ProjData.VarAttribute{2}.Role='ancillary';
@@ -227,5 +226,4 @@
         VarName=FieldData.ListVarName{ivar};
         ProjData.ListVarName=[ProjData.ListVarName {VarName}];
-        %ProjData.VarDimIndex=[ProjData.VarDimIndex {[1]}];
         ProjData.VarDimName=[ProjData.VarDimName {'nb_points'}];
     end
@@ -253,6 +251,6 @@
                FFName=FieldData.ListVarName{ivar_FF};
                eval(['FF=FieldData.' FFName '(indsel);'])
-               ind_indsel=find(~FF);
-               indsel=indsel(ind_indsel);
+               %ind_indsel=find(~FF);
+               indsel=indsel(~FF);
            end
            ProjData.NbVal(ipoint,1)=length(indsel);
@@ -750,13 +748,13 @@
                 Xproj=linelength/(2*npoint):linelength/npoint:linelength-linelength/(2*npoint);
                 siz=size(X_sel);
-                xregij=cos(theta(ip))*Xproj'*ones(1,siz(2))+ObjectData.Coord(ip,1);
-                yregij=sin(theta(ip))*Xproj'*ones(1,siz(2))+ObjectData.Coord(ip,2);
-                xij=ones(npoint,1)*X_sel;
-                yij=ones(npoint,1)*Y_sel;
+                xregij=cos(theta(ip))*ones(siz(1),1)*Xproj+ObjectData.Coord(ip,1);
+                yregij=sin(theta(ip))*ones(siz(1),1)*Xproj+ObjectData.Coord(ip,2);
+                xij=X_sel*ones(1,npoint);
+                yij=Y_sel*ones(1,npoint);
                 Aij=exp(-lambda*((xij-xregij).*(xij-xregij)+(yij-yregij).*(yij-yregij)));
-                norm=ones(1,siz(2))*Aij';
+                norm=Aij'*ones(siz(1),1);
                 for ivar=1:numel(ProjVar)
                      if ~isempty(ProjVar{ivar})
-                        ProjVar{ivar}=ProjVar{ivar}*Aij'./norm;
+                        ProjVar{ivar}=Aij'*ProjVar{ivar}./norm;
                      end
                 end              
@@ -1256,5 +1254,5 @@
         VarName=FieldData.ListVarName{VarIndex(1)};%get the first variable of the cell to get the input matrix dimensions
         eval(['DimValue=size(FieldData.' VarName ');'])%input matrix dimensions
-        DimValue(find(DimValue==1))=[];%remove singleton dimensions       
+        DimValue(DimValue==1)=[];%remove singleton dimensions       
         NbDim=numel(DimValue);%update number of space dimensions
         nbcolor=1; %default number of 'color' components: third matrix index without corresponding coordinate
Index: /trunk/src/set_object.m
===================================================================
--- /trunk/src/set_object.m	(revision 214)
+++ /trunk/src/set_object.m	(revision 215)
@@ -276,5 +276,5 @@
 z_new={};
 if isequal(get(handles.ZObject,'Visible'),'on')
-    data.NbDim=3; %test 3D object
+    %data.NbDim=3; %test 3D object
     Zcolumn=get(handles.ZObject,'String');
     if ischar(Zcolumn)
@@ -766,8 +766,5 @@
 
 %% plot the field projected on the object and store in the corresponding figue
-'TESTproj'
-UvData.Field
-ObjectData
-ProjData= proj_field(UvData.Field,ObjectData)%project the current interface field on ObjectData
+ProjData= proj_field(UvData.Field,ObjectData);%project the current interface field on ObjectData
 PlotParam=read_plot_param(PlotHandles);
 [PlotType,Object_out{IndexObj}.PlotParam,plotaxes]=plot_field(ProjData,plotaxes,PlotParam);%update an existing field plot
Index: /trunk/src/uvmat.m
===================================================================
--- /trunk/src/uvmat.m	(revision 214)
+++ /trunk/src/uvmat.m	(revision 215)
@@ -234,10 +234,10 @@
 %UvData.Object{1}.Style='plane';%main plotting plane
 UvData.Object{1}.ProjMode='projection';%main plotting plane
-if ~isfield(UvData.Object{1},'plotaxes')
-    UvData.Object{1}.plotaxes=handles.axes3;%default plotting axis
-    set(handles.list_object_1,'Value',1);
-   % set(handles.list_object_1,'String',{'1-PLANE'});
-   set(handles.list_object_1,'String',{''});
-end
+% if ~isfield(UvData.Object{1},'plotaxes')
+%     UvData.Object{1}.plotaxes=handles.axes3;%default plotting axis
+%     set(handles.list_object_1,'Value',1);
+%    % set(handles.list_object_1,'String',{'1-PLANE'});
+%    set(handles.list_object_1,'String',{''});
+% end
 set(handles.Fields,'Value',1)
 set(handles.Fields,'string',{''})
@@ -2529,7 +2529,7 @@
     set(handles.list_object_1,'String',{''});
 end
-if ~isfield(UvData.Object{1},'plotaxes')
-    UvData.Object{1}.plotaxes=handles.axes3;%default plotting axis 
-end
+% if ~isfield(UvData.Object{1},'plotaxes')
+%     UvData.Object{1}.plotaxes=handles.axes3;%default plotting axis 
+% end
 testnewseries=UvData.NewSeries;
 UvData.NewSeries=0;% put to 0 the test for a new field series (set by RootPath_callback)
@@ -2551,5 +2551,9 @@
 end
 plot_handles{1}=handles;
-haxes(1)=handles.axes3;
+if isfield(UvData,'plotaxes')%case of movies
+    haxes(1)=UvData.plotaxes;
+else
+    haxes(1)=handles.axes3;
+end
 PlotParam{1}=read_plot_param(handles);%read plotting parameters on the uvmat interfac
 keeplim(1)=get(handles.FixLimits,'Value');% test for fixed graph limits
@@ -4475,5 +4479,5 @@
 msgbox_uvmat('INPUT_Y-N',{['adjust figure ' num2str(newfig) ' with its matlab edit menu '] ;...
         ['then press OK to get the avi movie as a copy of figure ' num2str(newfig) ' display']});
-UvData.Object{1}.plotaxes=newaxes;% the axis in the new figure becomes the current main plotting axes
+UvData.plotaxes=newaxes;% the axis in the new figure becomes the current main plotting axes
 set(huvmat,'UserData',UvData);
 increment=str2double(get(handles.increment_scan,'String')); %get the field increment d
@@ -4509,6 +4513,7 @@
     end
 end
-close(aviobj);
-UvData.Object{1}.plotaxes=handles.axes3;
+aviobj=close(aviobj);
+UvData=rmfield(UvData,'plotaxes');
+%UvData.Object{1}.plotaxes=handles.axes3;
 set(huvmat,'UserData',UvData);
 msgbox_uvmat('CONFIRMATION',{['movie ' aviname ' created '];['with ' num2str(imax) ' frames']})
