Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/jmrplens/CATT2Matlab. Application to handle the information generated by CATT-Acoustic 8
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162%% Plot de posiciones 2Dfunction plotPosiciones2D(handles)% Version 2017.1% Autor: Jose Manuel Requena Plens% Email: <a href="matlab:web('mailto:info@jmrplens.com')">info@jmrplens.com</a>% Telegram: <a href="matlab:web('https://t.me/jmrplens')">@jmrplens</a>
global RecPosition_00 IDFuente IDRec_00 RoomDimensions_00% Ejes donde representaraxes(handles.plotfig)
cla reset; % Borrar el ploteval(sprintf('global SRCPosition_%s',IDFuente))eval(sprintf('SRCPosition = SRCPosition_%s;',IDFuente))% Plot de posiciones visto desde arribahold on;% A�ade al plot cada posicion de receptorVplot = gobjects(1,size(RecPosition_00,1)+1);for k=1:size(RecPosition_00,1) Vplot(k)=plot(RecPosition_00(k,1),RecPosition_00(k,2),'.');end% A�adir punto de la fuenteVplot(k+1)=plot(SRCPosition(1),SRCPosition(2),'p'); %#ok<NODEF>
DatLey = cat(2,IDRec_00,RecPosition_00(:,1:2));for k=1:size(IDRec_00,1) % Imprime en la leyenda la posicion en metros leyenda{k}=sprintf('%2d (%4.1f,%4.1f)',... DatLey(k,1),DatLey(k,2),DatLey(k,3));end
% Limite de los ejesLx = max(max(RecPosition_00(:,1)),RoomDimensions_00(1));Ly = max(max(RecPosition_00(:,2)),RoomDimensions_00(2));% A�adir lineas que delimitan las dimensiones de la salaX = [0,0,Lx,Lx,0];Y = [0,Ly,Ly,0,0];plot(X,Y,'-b','LineWidth',1.5)hold off;% Establecer limite de ejes para respetar el factor de formaLimEje = max(Lx,Ly);axis([0,LimEje,0,LimEje]);% A�adir info de la fuente en la leyendaleyenda{k+1}=[handles.LSOURCE,sprintf(' (%4.1f,%4.1f)',... SRCPosition(1),SRCPosition(2))];lgdw=legend(Vplot,leyenda);% Si se utiliza Matlab 2014b o anterior no a�ade el titulo a la leyenda ya% que no es compatibleif ~verLessThan('matlab','8.7') title(lgdw,[handles.LTITLELEGEND,sprintf('\n'),'\color{blue}ID (X,Y)(m)'])endlgdw.FontSize = 11;lgdw.Location = 'northeastoutside';text(RecPosition_00(:,1),RecPosition_00(:,2),num2str(IDRec_00),... 'VerticalAlignment','bottom','HorizontalAlignment','right')text(SRCPosition(:,1),SRCPosition(:,2),[handles.LSOURCE,sprintf(': %s',IDFuente)],... 'VerticalAlignment','top','HorizontalAlignment','left')title({handles.LTITLEMAPPOS;... ['\color{blue} ',handles.LSUBTITLE,sprintf(': %s',IDFuente)]});xlabel(handles.LLENGTHX)ylabel(handles.LLENGTHY)