Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Created display-data
No bugs; Simple to understand; Older code got corrupted; New code to display the data in a small window.
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |