Changeset 215
- Timestamp:
- Mar 8, 2011, 11:36:29 PM (14 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/imadoc2struct.m
r207 r215 92 92 end 93 93 if ~isempty(Dtj) 94 Dtj=reshape(Dtj'*ones(1,NbDtj),1,NbDtj*numel(Dtj)); %concatene Dt i vector NbDtitimes94 Dtj=reshape(Dtj'*ones(1,NbDtj),1,NbDtj*numel(Dtj)); %concatene Dtj vector NbDtj times 95 95 Dtj=[0 Dtj]; 96 96 Time_val=Time_val*ones(1,numel(Dtj))+ones(numel(Time_val),1)*cumsum(Dtj);% produce a time matrix with Dtj -
trunk/src/proj_field.m
r213 r215 220 220 ProjData.ListVarName={'Y','X','NbVal'}; 221 221 ProjData.VarDimName={'nb_points','nb_points','nb_points'}; 222 %ProjData.VarDimIndex={[1],[1],[1]};223 222 ProjData.VarAttribute{1}.Role='ancillary'; 224 223 ProjData.VarAttribute{2}.Role='ancillary'; … … 227 226 VarName=FieldData.ListVarName{ivar}; 228 227 ProjData.ListVarName=[ProjData.ListVarName {VarName}]; 229 %ProjData.VarDimIndex=[ProjData.VarDimIndex {[1]}];230 228 ProjData.VarDimName=[ProjData.VarDimName {'nb_points'}]; 231 229 end … … 253 251 FFName=FieldData.ListVarName{ivar_FF}; 254 252 eval(['FF=FieldData.' FFName '(indsel);']) 255 ind_indsel=find(~FF);256 indsel=indsel( ind_indsel);253 %ind_indsel=find(~FF); 254 indsel=indsel(~FF); 257 255 end 258 256 ProjData.NbVal(ipoint,1)=length(indsel); … … 750 748 Xproj=linelength/(2*npoint):linelength/npoint:linelength-linelength/(2*npoint); 751 749 siz=size(X_sel); 752 xregij=cos(theta(ip))* Xproj'*ones(1,siz(2))+ObjectData.Coord(ip,1);753 yregij=sin(theta(ip))* Xproj'*ones(1,siz(2))+ObjectData.Coord(ip,2);754 xij= ones(npoint,1)*X_sel;755 yij= ones(npoint,1)*Y_sel;750 xregij=cos(theta(ip))*ones(siz(1),1)*Xproj+ObjectData.Coord(ip,1); 751 yregij=sin(theta(ip))*ones(siz(1),1)*Xproj+ObjectData.Coord(ip,2); 752 xij=X_sel*ones(1,npoint); 753 yij=Y_sel*ones(1,npoint); 756 754 Aij=exp(-lambda*((xij-xregij).*(xij-xregij)+(yij-yregij).*(yij-yregij))); 757 norm= ones(1,siz(2))*Aij';755 norm=Aij'*ones(siz(1),1); 758 756 for ivar=1:numel(ProjVar) 759 757 if ~isempty(ProjVar{ivar}) 760 ProjVar{ivar}= ProjVar{ivar}*Aij'./norm;758 ProjVar{ivar}=Aij'*ProjVar{ivar}./norm; 761 759 end 762 760 end … … 1256 1254 VarName=FieldData.ListVarName{VarIndex(1)};%get the first variable of the cell to get the input matrix dimensions 1257 1255 eval(['DimValue=size(FieldData.' VarName ');'])%input matrix dimensions 1258 DimValue( find(DimValue==1))=[];%remove singleton dimensions1256 DimValue(DimValue==1)=[];%remove singleton dimensions 1259 1257 NbDim=numel(DimValue);%update number of space dimensions 1260 1258 nbcolor=1; %default number of 'color' components: third matrix index without corresponding coordinate -
trunk/src/set_object.m
r213 r215 276 276 z_new={}; 277 277 if isequal(get(handles.ZObject,'Visible'),'on') 278 data.NbDim=3; %test 3D object278 %data.NbDim=3; %test 3D object 279 279 Zcolumn=get(handles.ZObject,'String'); 280 280 if ischar(Zcolumn) … … 766 766 767 767 %% plot the field projected on the object and store in the corresponding figue 768 'TESTproj' 769 UvData.Field 770 ObjectData 771 ProjData= proj_field(UvData.Field,ObjectData)%project the current interface field on ObjectData 768 ProjData= proj_field(UvData.Field,ObjectData);%project the current interface field on ObjectData 772 769 PlotParam=read_plot_param(PlotHandles); 773 770 [PlotType,Object_out{IndexObj}.PlotParam,plotaxes]=plot_field(ProjData,plotaxes,PlotParam);%update an existing field plot -
trunk/src/uvmat.m
r210 r215 234 234 %UvData.Object{1}.Style='plane';%main plotting plane 235 235 UvData.Object{1}.ProjMode='projection';%main plotting plane 236 if ~isfield(UvData.Object{1},'plotaxes')237 UvData.Object{1}.plotaxes=handles.axes3;%default plotting axis238 set(handles.list_object_1,'Value',1);239 % set(handles.list_object_1,'String',{'1-PLANE'});240 set(handles.list_object_1,'String',{''});241 end236 % if ~isfield(UvData.Object{1},'plotaxes') 237 % UvData.Object{1}.plotaxes=handles.axes3;%default plotting axis 238 % set(handles.list_object_1,'Value',1); 239 % % set(handles.list_object_1,'String',{'1-PLANE'}); 240 % set(handles.list_object_1,'String',{''}); 241 % end 242 242 set(handles.Fields,'Value',1) 243 243 set(handles.Fields,'string',{''}) … … 2529 2529 set(handles.list_object_1,'String',{''}); 2530 2530 end 2531 if ~isfield(UvData.Object{1},'plotaxes')2532 UvData.Object{1}.plotaxes=handles.axes3;%default plotting axis2533 end2531 % if ~isfield(UvData.Object{1},'plotaxes') 2532 % UvData.Object{1}.plotaxes=handles.axes3;%default plotting axis 2533 % end 2534 2534 testnewseries=UvData.NewSeries; 2535 2535 UvData.NewSeries=0;% put to 0 the test for a new field series (set by RootPath_callback) … … 2551 2551 end 2552 2552 plot_handles{1}=handles; 2553 haxes(1)=handles.axes3; 2553 if isfield(UvData,'plotaxes')%case of movies 2554 haxes(1)=UvData.plotaxes; 2555 else 2556 haxes(1)=handles.axes3; 2557 end 2554 2558 PlotParam{1}=read_plot_param(handles);%read plotting parameters on the uvmat interfac 2555 2559 keeplim(1)=get(handles.FixLimits,'Value');% test for fixed graph limits … … 4475 4479 msgbox_uvmat('INPUT_Y-N',{['adjust figure ' num2str(newfig) ' with its matlab edit menu '] ;... 4476 4480 ['then press OK to get the avi movie as a copy of figure ' num2str(newfig) ' display']}); 4477 UvData. Object{1}.plotaxes=newaxes;% the axis in the new figure becomes the current main plotting axes4481 UvData.plotaxes=newaxes;% the axis in the new figure becomes the current main plotting axes 4478 4482 set(huvmat,'UserData',UvData); 4479 4483 increment=str2double(get(handles.increment_scan,'String')); %get the field increment d … … 4509 4513 end 4510 4514 end 4511 close(aviobj); 4512 UvData.Object{1}.plotaxes=handles.axes3; 4515 aviobj=close(aviobj); 4516 UvData=rmfield(UvData,'plotaxes'); 4517 %UvData.Object{1}.plotaxes=handles.axes3; 4513 4518 set(huvmat,'UserData',UvData); 4514 4519 msgbox_uvmat('CONFIRMATION',{['movie ' aviname ' created '];['with ' num2str(imax) ' frames']})
Note: See TracChangeset
for help on using the changeset viewer.