How to implement a function slideshow to multiple figures ?
Mostrar comentarios más antiguos
I want to create a slideshow to see the figures of my data project.
I found a function slideshow() on matlab documentation but I don't know how to impleent in the code below. The loop goes trough 24 figures in csv files.
Any ideia how to implement this?
if(~isdeployed)
cd(fileparts(which(mfilename)));
end
DataPath = '.\';
AvailableFiles = dir((fullfile(DataPath, '*.csv'))); % list available data files
fileName = 'o3_surface_20180701000000.nc';
% latData = ncread(fileName,'latitude');
for idx = 1: size(AvailableFiles,1)
OpenFileName = AvailableFiles(idx).name;
X = ncread('o3_surface_20180701000000.nc', 'lat');
Y = ncread('o3_surface_20180701000000.nc', 'lon');
% this is one hours for Cluster based ensemble data. you will 23 more
Z = csvread(OpenFileName);
X= double(X);
Y= double(Y);
%% Create a display of the data from the NetCDF files like this
[X,Y] = meshgrid(X, Y);
figure(idx);
clf
% Create the map
worldmap('europe'); % set the part of the earth to show
load coastlines
plotm(coastlat,coastlon)
land = shaperead('landareas', 'UseGeoCoords', true);
geoshow(gca, land, 'FaceColor', [0.5 0.7 0.5])
lakes = shaperead('worldlakes', 'UseGeoCoords', true);
geoshow(lakes, 'FaceColor', 'blue')
rivers = shaperead('worldrivers', 'UseGeoCoords', true);
geoshow(rivers, 'Color', 'blue')
cities = shaperead('worldcities', 'UseGeoCoords', true);
geoshow(cities, 'Marker', '.', 'Color', 'red')
% Plot the data
surfm(X, Y, Z, 'EdgeColor', 'none',...
'FaceAlpha', 0.5) % edge colour outlines the edges, 'FaceAlpha', sets the transparency
end
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Image Processing Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!