From 3b062266632ac05fc827db31e4875bf9c92490c8 Mon Sep 17 00:00:00 2001 From: "Daniel da Silva Dias (dasilv32)" Date: Sat, 25 Jul 2020 19:13:01 +0100 Subject: [PATCH] Created display-data No bugs; Simple to understand; Older code got corrupted; New code to display the data in a small window. --- display_data | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 display_data diff --git a/display_data b/display_data new file mode 100644 index 0000000..c32760a --- /dev/null +++ b/display_data @@ -0,0 +1,40 @@ + +display() + + +function display + %to make sure the file actually exists, if not the user will know + if(~isdeployed) + cd(fileparts(which(mfilename))); + end + DataPath = '.\'; + AvailableFiles = dir((fullfile(DataPath, '*.fig'))); % list available data files + + for idx = 1: size(AvailableFiles,1) %loop all the images + + %opens the figures (all) + OpenFileName = AvailableFiles(idx).name; + fig = openfig(OpenFileName); + + %saving data in csv extension + Ozone = fig.Children.Children.ZData; + Name = strsplit(OpenFileName,'.'); + writematrix(Ozone, strcat(Name{1},'.csv')) + + %captions for the visualization + show_colorbar; % creates a color bar for easier readings of levels + + + %make the window centered or maximized + %movegui(fig,[300 600]); + + + + end +end +function exit_program + exit +end +function show_colorbar + colorbar +end