Changeset 150 for trunk/src/plot_field.m
- Timestamp:
- Dec 3, 2010, 12:16:51 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/plot_field.m
r147 r150 231 231 end 232 232 233 % set graph aspect ratio234 if isfield(AxeData,'Mesh')235 Data.Mesh=AxeData.Mesh;236 end233 % % set graph aspect ratio 234 % if isfield(AxeData,'Mesh') 235 % Data.Mesh=AxeData.Mesh; 236 % end 237 237 238 238 %set(haxes,'UserData',AxeData) … … 448 448 hlegend=legend(legend_str); 449 449 txt=ver('MATLAB'); 450 Release=txt.Release 451 relnumb=str2 num(Release(3:4));% should be changed to Version for better compatibility450 Release=txt.Release; 451 relnumb=str2double(Release(3:4));% should be changed to Version for better compatibility 452 452 if relnumb >= 14 453 453 set(hlegend,'Interpreter','none')% desable tex interpreter … … 474 474 txt=ver('MATLAB'); 475 475 Release=txt.Release; 476 relnumb=str2 num(Release(3:4));476 relnumb=str2double(Release(3:4)); 477 477 if relnumb >= 14 478 478 set(htitle,'Interpreter','none')% desable tex interpreter … … 928 928 vec_U=reshape(vec_U,1,numel(vec_U)); 929 929 vec_V=reshape(vec_V,1,numel(vec_V)); 930 MinMaxX=max(vec_X)-min(vec_X);931 MinMaxY=max(vec_Y)-min(vec_Y);932 AxeData.Mesh=sqrt((MinMaxX*MinMaxY)/length(vec_X));930 MinMaxX=max(vec_X)-min(vec_X); 931 % MinMaxY=max(vec_Y)-min(vec_Y); 932 % AxeData.Mesh=sqrt((MinMaxX*MinMaxY)/length(vec_X)); 933 933 if ~isfield(PlotParam.Vectors,'AutoVec') || isequal(PlotParam.Vectors.AutoVec,0)|| ~isfield(PlotParam.Vectors,'VecScale')... 934 934 ||isempty(PlotParam.Vectors.VecScale)||~isa(PlotParam.Vectors.VecScale,'double') %automatic vector scale … … 937 937 indsel=find(AxeData.FF==0);%indsel =indices of good vectors 938 938 else 939 indsel= [1:numel(vec_X)];%939 indsel=1:numel(vec_X);% 940 940 end 941 941 if isempty(vec_U) … … 977 977 978 978 %decimate by a factor 2 in vector mesh(4 in nbre of vectors) 979 if isfield(PlotParam.Vectors,'decimate4') &isequal(PlotParam.Vectors.decimate4,1)979 if isfield(PlotParam.Vectors,'decimate4') && isequal(PlotParam.Vectors.decimate4,1) 980 980 diffy=diff(vec_Y); %difference dy=vec_Y(i+1)-vec_Y(i) 981 981 dy_thresh=max(abs(diffy))/2; … … 983 983 ind_sel=1:ind_jump(1);%select the first line 984 984 for i=2:2:length(ind_jump)-1 985 ind_sel=[ind_sel [ind_jump(i)+1:ind_jump(i+1)]];% select the odd lines985 ind_sel=[ind_sel (ind_jump(i)+1:ind_jump(i+1))];% select the odd lines 986 986 end 987 987 nb_sel=length(ind_sel); … … 1042 1042 AxeData.F=[]; 1043 1043 AxeData.FF=[]; 1044 AxeData.Mesh=[];1044 % AxeData.Mesh=[]; 1045 1045 PlotParamOut=rmfield(PlotParamOut,'Vectors'); 1046 1046 end … … 1169 1169 hx = [x1;x2;x3]; 1170 1170 hy = [y1;y2;y3]; 1171 tri=reshape( [1:3*length(uc)],3,[])';1171 tri=reshape(1:3*length(uc),3,[])'; 1172 1172 d = tri(:,[1 2 3 1])'; 1173 1173
Note: See TracChangeset
for help on using the changeset viewer.