フィルターのクリア

MAP AND GRAPHS IN GUI DOESN'T WORK

1 回表示 (過去 30 日間)
Adam Kubica
Adam Kubica 2023 年 2 月 21 日
コメント済み: Voss 2023 年 2 月 22 日
Hello!
I would like to ask..
I made a GUI program where I examine graphs from measured data in a text file. The GUI works as follows: The first title page, after clicking on the "NAHRÁT DATA" button, I select a text file and graphs are displayed including all the functions that I have programmed. (SEE PICTURES)
I added a commands to display the map in the GUI from the text file data (longtitude, latitude of car drive):
%----------- MAPA ----------% (MAP)
% NAČTENÍ DAT (LOAD DATA FROM TXT FILE)
lat=(X(:,6)); % LATITUDE 6. SLOUPEC TXT (6th COLUMN TXT FILE)
lon=(X(:,7)); % LONGTITUDE 7. SLOUPEC TXT (7TH COLUMN TXT FILE)
% MAPOVÝ PODKLAD V GUI (MAP PLOT)
ax5=axes('units', 'norm', 'position', [0.65 0.67 0.30 0.30], 'tag', 'axes5');
geoplot(lat, lon, 'LineWidth', 2, 'color', 'red');
% set (ax5, 'fontsize', 9) % LABELS MAP AXIS - NOT WORKING. MAP WILL DISSAPEAR
grid on
box on
hold on;
% VLASTNOSTI MAPY (MAP SETTINGS)
% - NOT WORKING. MAP WILL DISSAPEAR IF I WANNA USE THIS
% geolimits(ax5, [min(lat) max(lat)], [min(lon) max(lon)]); % Nastavení hranic mapy
% geobasemap(ax5, 'topographic'); % Typ mapy
However, I have two problems:
1) When I add the code to set the MAP SETTINGS, the map does not work for me. B It will display correctly without this setting. The same if I add the code to set the axis label - not working. Is there a mistake somewhere please?
2) If I upload a text file that does not contain the data needed to display the map, my buttons disappear in the lower right edge of my GUI (see figure 2).
I have 3 graphs in the GUI. Before I added the commands to display the map, all the buttons were displayed correctly. If I uploaded a text file that didn't contain the necessary data for one of the three graphs, everything worked, only that graph didn't show up.
I need a setup that can handle both situations. When I upload a text file with longtitude and latitude data - the map is displayed. When I upload a text file without this information - the map won't show BUT the buttons will work normally.
I hope I explained it clearly.MY GUI CODE THERE:
%--------------------------------------------------------------------
% APLIKACE PRO MĚŘENÍ ROVINATOSTI LETIŠTNÍCH PLOCH S GUI (ORIGINAL) -
% DATUM: 10.06.2022 -
% VERZE: 1.1 -
% ZPRACOVAL: pplk. gšt. Ing. Ph.D. Luděk ČIČMANEC -
% rtm. ček. Adam KUBICA -
%--------------------------------------------------------------------
function gui_LP_01 (vstpar)
if nargin==0
%[1 1 1]
f=figure('color', [0.8 0.8 0.8], 'name', 'GUI LP ver.01', 'numbertitle', 'off','menubar', 'none', 'units', 'norm',...
'position', [0.1 0.07 0.85 0.85],'tag', 'figure1', 'closerequestfcn', ' '); % ÚVODNÍ OBRÁZEK
set(f,'toolbar','figure'); % TOOLBAR
% TITULNÍ OBRÁZEK
fi=axes('units', 'norm', 'position',[0.35 0.35 0.25 0.25],'tag', 'axesfi');
cdata = imread('obr1.png');
im = image(cdata,'Parent',fi);
fi.XTick = []; % ODSTRANÍ OSU OBRÁZKU
fi.YTick = [];
fi.Visible = 'off'; % ODSTRANÍ RÁMEČEK OBRÁZKU
% PUSHBUTTONS -----------------------------------------------------------------------------------------------------------------%
% NAHRÁNÍ DAT Z TEXTOVÉHO SOUBORU
uicontrol('units', 'norm', 'position', [0.83 0.02 0.09 0.03], 'style', 'push', 'tag', 'najit', 'string',...
'NAHRÁT DATA', 'fontsize', 12, 'foregroundcolor', [0 0 0],'backgroundcolor', [0.3010, 0.7450, 0.9330], 'callback', 'gui_LP_01 najit');
% UKONČENÍ PROGRAMU
uicontrol('units', 'norm', 'position', [0.93 0.02 0.06 0.03], 'style', 'push', 'tag', 'konec', 'string',...
'UKONČIT', 'fontsize', 12, 'foregroundcolor', [0 0 0],'backgroundcolor','y', 'callback', 'gui_LP_01 konec');
%------------------------------------------------------------------------------------------------------------------------------%
else
switch (vstpar)
case ('konec')
% close all
delete (get (0, 'children')) % zavreni vseho
case('najit') % najit data
cla % smaže všechny grafy včetně os cla reset pouze graf osy zůstanou
[filename, pathname] = uigetfile('*.txt','Select file to read message'); % filename
% selected data display
if isequal(filename,0)
disp('User selected Cancel')
else
delete (findobj('tag','axes1')); %smaže původní graf
delete (findobj('tag','axes2')); %smaže původní graf
delete (findobj('tag','axes3')); %smaže původní graf
delete (findobj('tag','axes4')); %smaže původní graf
delete (findobj('tag','axes5')); %smaže původní graf
delete (findobj('tag','axes6')); %smaže původní graf
delete (findobj('tag','axes7')); %smaže původní graf
delete (findobj('tag','axes8')); %smaže původní graf
disp(['User selected ', fullfile(pathname, filename)])
end
% ULOŽENÍ DAT, MATICE X
% X = dlmread(filename); %[R1 C1 R2 C2]
% X=csvread(filename,262,0); % restrict reading from 3 sec = 262 row
X=csvread(filename,7,0); % no restriction
t=X(:,1);
% tout = t(2:end) - t(1); % jak přidat jeden řádek?
%------------------------------------------------------------------------------------------------------------------------------%
%---------- PANEL OVLÁDÁNÍ ----------%
% POSUV V ČASE
uipanel('units','norm','position',[0.855 0.08 0.14 0.19],'title','POSUV V ČASE','backgroundcolor', get(gcf,'color'),...
'fontsize',12,'foregroundcolor',[0.9 0.9 0.9],'tag','panel1');
% FILTR
uipanel('units','norm','position',[0.67 0.12 0.18 0.15],'title','FILTR','backgroundcolor', get(gcf,'color'),...
'fontsize',12,'foregroundcolor',[0.9 0.9 0.9],'tag','panel2');
%---------- GRAF ZRYCHLENÍ V OSE Y ----------%
% y=X(:,3); % DATA Z TŘETÍHO SLOUPCE TEXTOVÉHO SOUBORU
My=mean(X(:,3)); % KALIBRACE NA STŘEDNÍ HODNOTU
y=X(:,3)-My; % [0.6 0.5 0.8]
ax2=axes('units', 'norm', 'position', [0.045 0.73 0.50 0.24], 'color', [0.7 0.7 0.7], 'tag', 'axes2');
xlabel ('T [s]', 'fontsize', 10, 'fontweight', 'bold') % POPIS OSY X
ylabel ('Zrychlení Yg (m/s^2)', 'fontsize', 10, 'fontweight', 'bold') % POPIS OSY Y
set (ax2, 'fontsize', 9) % VELIKOST FONTU POPISKU OS
grid on % MŘÍŽKA GRAFU
box on % RÁM GRAFU
L3=line(t, y, 'color', [0 1 0], 'linewidth', 1, 'parent', ax2); % VYKRESLÍ PRŮBĚH SIGNÁLU
% DENOISING YG
avgy = wdenoise(y, 3, 'Wavelet', 'db4', 'DenoisingMethod', 'Bayes', 'ThresholdRule', 'Median', 'NoiseEstimate', 'LevelIndependent');
tdy = t;
hold on;
% FINDPEAKS YG
%findpeaks(avgy,tdy, 'MinPeakDistance',0.005, 'MinPeakProminence',0.07); % NAJDE VRCHOLY ZRYCHLENÍ
LMax = islocalmax(avgy, MaxNumExtrema=18, MinProminence=0.035, ProminenceWindow=1); % NAJDE KLADNÉ VRCHOLY ZRYCHLENÍ
LMin = islocalmin(avgy, MaxNumExtrema=18, MinProminence=0.029, ProminenceWindow=1); % NAJDE ZÁPORNÉ VRCHOLY ZRYCHLENÍ
L4=line(tdy, avgy, 'color', 'yellow', 'linewidth',2, 'parent', ax2);
Ly=[L3 L4];
LMax1=plot(tdy,avgy,tdy(LMax),avgy(LMax),'rx', 'linewidth', 2, LineStyle='none'); % NASTAVENÍ LMax
LMin1=plot(tdy,avgy,tdy(LMin),avgy(LMin),'b*', 'linewidth', 1, LineStyle='none'); % NASTAVENÍ LMin
hold on
ax2=gca;
set (ax2, 'userdata',Ly) % do uschovny [CO TO ZNAMENÁ?]
legend('Yg', 'Filtr', 'location', 'northeast'); % LEGENDA
%legend('boxoff'); % ODSTRANÍ RÁMEČEK LEGENDY
%.........................................................................%
%---------- GRAF ZRYCHLENÍ V OSE Z ----------%
% z=-X(:,4); % DATA Z ČTVRTÉHO SLOUPCE TEXTOVÉHO SOUBORU
Mz=mean(X(:,4)); % KALIBRACE NA STŘEDNÍ HODNOTU
z=X(:,4)-Mz;
ax3=axes('units', 'norm', 'position', [0.045 0.42 0.50 0.24], 'color', [0.7 0.7 0.7], 'tag', 'axes3');
xlabel ('T [s]', 'fontsize', 10, 'fontweight', 'bold') % POPIS OSY X
ylabel ('Zrychlení Zg (m/s^2)', 'fontsize', 10, 'fontweight', 'bold') % POPIS OSY Y
set (ax3, 'fontsize', 9) % VELIKOST FONTU POPISKU OS
grid on % MŘÍŽKA GRAFU
box on % RÁM GRAFU
L5=line(t,z, 'color', 'green', 'linewidth',1, 'parent', ax3); % VYKRESLÍ PRŮBĚH SIGNÁLU
% MOVING AVERAGE FILTER ZG
%samplesPerSec=3;
%coeffz=ones(1,samplesPerSec)/samplesPerSec;
%avgz=filter(coeffz,1,z);
%fDelayz = (length(coeffz)-1)/57.7; % CENTRUJE POČÁTEK FILTRU NA 0
%tdz=t-fDelayz/86;
%hold on
% SAVITZKY-GOLAY FILTER ZG
%order = 4;
%framelen = 9;
%avgz = sgolayfilt(z, order, framelen);
%tdz=t;
%hold on
% DENOISING ZG
avgz = wdenoise(z, 3, 'Wavelet', 'db4', 'DenoisingMethod', 'Bayes', 'ThresholdRule', 'Median', 'NoiseEstimate', 'LevelIndependent');
tdz = t;
hold on;
% FINDPEAKS ZG
ZgMax = islocalmax(avgz, MaxNumExtrema=18, MinProminence=0.160); % NAJDE KLADNÉ VRCHOLY ZRYCHLENÍ
ZgMin = islocalmin(avgz, MaxNumExtrema=18, MinProminence=0.150); % NAJDE ZÁPORNÉ VRCHOLY ZRYCHLENÍ
L6=line(tdz,avgz, 'color', 'white', 'linewidth',2, 'parent', ax3);
Lz=[L5 L6]; % HANDLE
ZgMax1=plot(tdz,avgz,tdz(ZgMax),avgz(ZgMax),'rx', 'linewidth', 2, LineStyle='none'); % NASTAVENÍ LMax
ZgMin1=plot(tdz,avgz,tdz(ZgMin),avgz(ZgMin),'b*', 'linewidth', 1, LineStyle='none'); % NASTAVENÍ LMin
ax3=gca;
set (ax3, 'userdata',Lz) % do uschovny [CO TO ZNAMENÁ?
legend('Zg','Filtr','location','northeast'); % LEGENDA
%legend('boxoff'); % ODSTRANÍ RÁMEČEK LEGENDY
%.........................................................................%
%---------- GRAF RYCHLOSTI VOZIDLA PŘI SBĚRU DAT ----------%
% z=-X(:,5); % DATA Z PÁTÉHO SLOUPCE TEXTOVÉHO SOUBORU
Mv=mean(X(:,5)); % KALIBRACE NA STŘEDNÍ HODNOTU
v=X(:,5);
ax4=axes('units', 'norm', 'position', [0.045 0.10 0.50 0.24], 'color', [0.7 0.7 0.7], 'xlim', [0 inf],'ylim', [12 16], 'tag', 'axes4');
xlabel ('T [s]', 'fontsize', 10, 'fontweight', 'bold') % POPIS OSY X
ylabel ('Rychlost V (m/s)', 'fontsize', 10, 'fontweight', 'bold') % POPIS OSY Y
set (ax4, 'fontsize', 9) % VELIKOST FONTU POPISKU OS
grid on % MŘÍŽKA GRAFU
box on % RÁM GRAFU
L5=line(t,v, 'color', 'green', 'linewidth',2, 'parent', ax4); % VYKRESLÍ PRŮBĚH SIGNÁLU
legend('Rychlost V','Filtr','location','northeast'); % LEGENDA
% legend('boxoff'); % ODSTRANÍ RÁMEČEK LEGENDY
%MAP CODE THERE %----------- MAPA ----------%
% NAČTENÍ DAT
lat=(X(:,6)); % LATITUDE 6. SLOUPEC TXT
lon=(X(:,7)); % LONGTITUDE 7. SLOUPEC TXT
% MAPOVÝ PODKLAD V GUI
ax5=axes('units', 'norm', 'position', [0.65 0.67 0.30 0.30], 'tag', 'axes5');
geoplot(lat, lon, 'LineWidth', 2, 'Color', 'r');
% set (ax5, 'fontsize', 9) % VELIKOST FONTU POPISKU OS
grid on % MŘÍŽKA MAPY
box on % RÁM MAPY
hold on;
% VLASTNOSTI MAPY
% geolimits(ax5, [min(lat) max(lat)], [min(lon) max(lon)]); % Nastavení hranic mapy
% geobasemap(ax5, 'topographic'); % Typ mapy
%------------------------------------------------------------------------------------------------------------------------------%
% PUSHBUTTONS2 ----------------------------------------------------------------------------------------------------------------%
% PMax -------------------------------------------------------------------%
% TLAČÍTKO PRO SKRYTÍ PMax
c = uicontrol('units','norm','position',[0.75 0.45 0.06 0.03], 'style', 'push', 'tag', 'string',...
'fontsize', 10, 'foregroundcolor', [0 0 0], 'backgroundcolor', [1 0 0]);
c.String = 'PMax OFF';
c.Callback = @(a,b)PMax1_OFF(LMax1,ZgMax1);
% TLAČÍTKO PRO ZOBRAZENÍ PMax
c = uicontrol('units','norm','position',[0.68 0.45 0.06 0.03], 'style', 'push', 'tag', 'string',...
'fontsize', 10, 'foregroundcolor', [0 0 0], 'backgroundcolor', [0 1 0]);
c.String = 'PMax ON';
c.Callback = @(a,b)PMax1_ON(LMax1,ZgMax1);
% PMin -------------------------------------------------------------------%
% TLAČÍTKO PRO SKRYTÍ PMin
c = uicontrol('units','norm','position',[0.75 0.40 0.06 0.03], 'style', 'push', 'tag', 'string',...
'fontsize', 10, 'foregroundcolor', [0 0 0], 'backgroundcolor', [1 0 0]);
c.String = 'PMin OFF';
c.Callback = @(a,b)PMin1_OFF(LMin1,ZgMin1);
% TLAČÍTKO PRO ZOBRAZENÍ PMin
c = uicontrol('units','norm','position',[0.68 0.40 0.06 0.03], 'style', 'push', 'tag', 'string',...
'fontsize', 10, 'foregroundcolor', [0 0 0], 'backgroundcolor', [0 1 0]);
c.String = 'PMin ON';
c.Callback = @(a,b)PMin1_ON(LMin1,ZgMin1);
% Filtr Y+Z --------------------------------------------------------------%
% TLAČÍTKO PRO SKRYTÍ FILTRU GRAFU ZRYCHLENÍ V OSE Y+Z
c = uicontrol('units','norm','position',[0.765 0.21 0.08 0.03], 'style', 'push', 'tag', 'string',...
'fontsize', 10, 'foregroundcolor', [0 0 0],'backgroundcolor', [1 0 0]);
c.String = 'FILTR Y+Z OFF';
c.Callback = @(a,b)Filtr23_OFF(L4,L6);
% TLAČÍTKO PRO ZOBRAZENÍ FILTRU GRAFU ZRYCHLENÍ V OSE Y+Z
c = uicontrol('units','norm','position',[0.675 0.21 0.08 0.03], 'style', 'push', 'tag', 'string',...
'fontsize', 10, 'foregroundcolor', [0 0 0],'backgroundcolor', [0 1 0]);
c.String = 'FILTR Y+Z ON';
c.Callback = @(a,b)Filtr23_ON(L4,L6);
% Filtr Y ----------------------------------------------------------------%
% TLAČÍTKO PRO SKRYTÍ FILTRU GRAFU ZRYCHLENÍ V OSE Y
c = uicontrol('units','norm','position',[0.765 0.17 0.07 0.03], 'style', 'push', 'tag', 'string',...
'fontsize', 10, 'foregroundcolor', [0 0 0],'backgroundcolor', [1 0 0]);
c.String = 'FILTR Y OFF';
c.Callback = @(a,b)Filtr2_OFF(L4);
% TLAČÍTKO PRO ZOBRAZENÍ FILTRU GRAFU ZRYCHLENÍ V OSE Y
c = uicontrol('units','norm','position',[0.685 0.17 0.07 0.03], 'style', 'push', 'tag', 'string',...
'fontsize', 10, 'foregroundcolor', [0 0 0],'backgroundcolor', [0 1 0]);
c.String = 'FILTR Y ON';
c.Callback = @(a,b)Filtr2_ON(L4);
% Filtr Z ----------------------------------------------------------------%
% TLAČÍTKO PRO SKRYTÍ FILTRU GRAFU ZRYCHLENÍ V OSE Z
c = uicontrol('units','norm','position',[0.765 0.13 0.07 0.03], 'style', 'push', 'tag', 'string',...
'fontsize', 10, 'foregroundcolor', [0 0 0],'backgroundcolor', [1 0 0]);
c.String = 'FILTR Z OFF';
c.Callback = @(a,b)Filtr3_OFF(L6);
% TLAČÍTKO PRO ZOBRAZENÍ FILTRU GRAFU ZRYCHLENÍ V OSE Z
c = uicontrol('units','norm','position',[0.685 0.13 0.07 0.03], 'style', 'push', 'tag', 'string',...
'fontsize', 10, 'foregroundcolor', [0 0 0],'backgroundcolor', [0 1 0]);
c.String = 'FILTR Z ON';
c.Callback = @(a,b)Filtr3_ON(L6);
%-------------------------------------------------------------------------%
% TLAČÍTKA PRO JEDNOTLIVÉ ČASOVÉ ÚSEKY GRAFŮ -----------------------------%
% GRAF V ČASE T = 0-5sek
uicontrol('units', 'norm', 'position', [0.86 0.21 0.13 0.03], 'style', 'push', 'tag', '0-5', 'string',...
'ČASOVÝ ÚSEK T=0-5 [s]', 'fontsize', 10, 'foregroundcolor', [0 0 0],'backgroundcolor', [0.9290, 0.6940, 0.1250], 'callback', 'gui_LP_01 0-5');
% GRAF V ČASE T = 5-10sek
uicontrol('units', 'norm', 'position', [0.86 0.17 0.13 0.03], 'style', 'push', 'tag', '5-10', 'string',...
'ČASOVÝ ÚSEK T=5-10 [s]', 'fontsize', 10, 'foregroundcolor', [0 0 0],'backgroundcolor', [0.9290, 0.6940, 0.1250], 'callback', 'gui_LP_01 5-10');
% GRAF V ČASE T = 10-15sek
uicontrol('units', 'norm', 'position', [0.86 0.13 0.13 0.03], 'style', 'push', 'tag', '10-15', 'string',...
'ČASOVÝ ÚSEK T=10-15 [s]', 'fontsize', 10, 'foregroundcolor', [0 0 0],'backgroundcolor', [0.9290, 0.6940, 0.1250], 'callback', 'gui_LP_01 10-15');
% GRAF V ČASE T = 15-20sek
uicontrol('units', 'norm', 'position', [0.86 0.09 0.13 0.03], 'style', 'push', 'tag', '15-20', 'string',...
'ČASOVÝ ÚSEK T=15-20 [s]', 'fontsize', 10, 'foregroundcolor', [0 0 0],'backgroundcolor', [0.9290, 0.6940, 0.1250], 'callback', 'gui_LP_01 15-20');
% GRAF V ČASE T = 0-5sek ---------------------------------------%
case('0-5')
U=get(findobj('tag','0-5'),'value');
if U==1
set (findobj('tag','axes1'), 'xlim', [0 5]);
set (findobj('tag','axes2'), 'xlim', [0 5]);
set (findobj('tag','axes3'), 'xlim', [0 5]);
set (findobj('tag','axes4'), 'xlim', [0 5]);
else
set (findobj('tag','axes1'),'xlim', [0 5])
set (findobj('tag','axes2'),'xlim', [0 5])
set (findobj('tag','axes3'),'xlim', [0 5])
set (findobj('tag','axes4'),'xlim', [0 5])
end
% GRAF V ČASE T = 5-10sek --------------------------------------%
case('5-10')
V=get(findobj('tag','5-10'),'value');
if V==1
set (findobj('tag','axes1'),'xlim', [5 10])
set (findobj('tag','axes2'),'xlim', [5 10]);
set (findobj('tag','axes3'),'xlim', [5 10]);
set (findobj('tag','axes4'),'xlim', [5 10]);
else
set (findobj('tag','axes1'), 'xlim', [5 10]);
set (findobj('tag','axes2'), 'xlim', [5 10]);
set (findobj('tag','axes3'), 'xlim', [5 10]);
set (findobj('tag','axes4'), 'xlim', [5 10]);
end
% GRAF V ČASE T = 10-15sek -------------------------------------%
case('10-15')
J=get(findobj('tag','10-15'),'value');
if J==1
set (findobj('tag','axes1'),'xlim', [10 15]);
set (findobj('tag','axes2'),'xlim', [10 15])
set (findobj('tag','axes3'),'xlim', [10 15]);
set (findobj('tag','axes4'),'xlim', [10 15]);
else
set (findobj('tag','axes1'), 'xlim', [10 15]);
set (findobj('tag','axes2'), 'xlim', [10 15]);
set (findobj('tag','axes3'), 'xlim', [10 15]);
set (findobj('tag','axes4'), 'xlim', [10 15]);
end
% GRAF V ČASE T = 15-20sek -------------------------------------%
case('15-20')
P=get(findobj('tag','15-20'),'value');
if P==1
set (findobj('tag','axes1'),'xlim', [15 20]);
set (findobj('tag','axes2'),'xlim', [15 20]);
set (findobj('tag','axes3'),'xlim', [15 20])
set (findobj('tag','axes4'),'xlim', [15 20]);
else
set (findobj('tag','axes1'), 'xlim', [15 20]);
set (findobj('tag','axes2'), 'xlim', [15 20]);
set (findobj('tag','axes3'), 'xlim', [15 20]);
set (findobj('tag','axes4'), 'xlim', [15 20]);
end
end % KONEC SWITCH
end % OD NARGIN
end % KONEC FUNKCE gui_LP_01
%------------------------------------------------------------------------------------------------------------------------------%
% DALŠÍ FUNKCE ----------------------------------------------------------------------------------------------------------------%
% FILTRY SKRYTÍ/ZOBRAZENÍ ------------------------------------------------%
% FUNKCE PRO SKRYTÍ FILTRU GRAFU ZRYCHLENÍ V OSE Y
function Filtr2_OFF(L4)
L4.Visible = 'off';
end
% FUNKCE PRO ZOBRAZENÍ FILTRU GRAFU ZRYCHLENÍ V OSE Y
function Filtr2_ON(L4)
L4.Visible = 'on';
end
%-------------------------------------------------------------------------%
% FUNKCE PRO SKRYTÍ FILTRU GRAFU ZRYCHLENÍ V OSE Z
function Filtr3_OFF(L6)
L6.Visible = 'off';
end
% FUNKCE PRO ZOBRAZENÍ FILTRU GRAFU ZRYCHLENÍ V OSE Z
function Filtr3_ON(L6)
L6.Visible = 'on';
end
%-------------------------------------------------------------------------%
% FUNKCE PRO SKRYTÍ FILTRU V GRAFU ZRYCHLENÍ V OSE Y+Z
function Filtr23_OFF(L4,L6)
L4.Visible = 'off';
L6.Visible = 'off';
end
% FUNKCE PRO ZOBRAZENÍ FILTRU V GRAFU ZRYCHLENÍ V OSE Y+Z
function Filtr23_ON(L4,L6)
L4.Visible = 'on';
L6.Visible = 'on';
end
%-------------------------------------------------------------------------%
%-------------------------------------------------------------------------%
% PMAX SKRYTÍ/ZOBRAZENÍ
% FUNKCE PRO SKRYTÍ LMax, ZgMax
function PMax1_OFF(LMax1,ZgMax1)
set(LMax1,'visible','off');
set(ZgMax1,'visible','off');
end
% FUNKCE PRO ZOBRAZENÍ LMax, ZgMax
function PMax1_ON(LMax1,ZgMax1)
set(LMax1,'visible','on');
set(ZgMax1,'visible','on');
end
%-------------------------------------------------------------------------%
% FUNKCE PRO SKRYTÍ LMin, ZgMin
function PMin1_OFF(LMin1,ZgMin1)
set(LMin1,'visible','off');
set(ZgMin1,'visible','off');
end
% FUNKCE PRO ZOBRAZENÍ LMin, ZgMin
function PMin1_ON(LMin1,ZgMin1)
set(LMin1,'visible','on');
set(ZgMin1,'visible','on');
end
  6 件のコメント
Adam Kubica
Adam Kubica 2023 年 2 月 21 日
Problem solved! It was enough to change the order of individual codes :D How simple!
Voss
Voss 2023 年 2 月 22 日
You'll still have two panels for each time you load a file, with the new panels being on top of the older ones so that you only ever see two.

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2023 年 2 月 21 日
geoplot can only draw in Geographic Axes objects, but your other graphics are Cartesian axes objects.
  1 件のコメント
Adam Kubica
Adam Kubica 2023 年 2 月 21 日
I didn't even think of that! You see, I have insufficient theoretical knowledge.. My fault. However, is there any way to further configure the map settings? At least, for example, changing the map to the view from the plane, instead of the tourist map?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeApp Building についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by