Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
Morgan R Fonley committed Aug 3, 2018
1 parent 8d8eb72 commit 7c34f01
Show file tree
Hide file tree
Showing 8 changed files with 119,462 additions and 0 deletions.
1 change: 1 addition & 0 deletions HydrusOutput
Submodule HydrusOutput added at d097b7
32 changes: 32 additions & 0 deletions MatlabPlotter.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
% ode to plot the streamflow determined from nonlinear codes

fid=('NoTile0.dat');
fidTile=('Tile0.dat');

ThisStruct=ReadDataDimNew(fid);
SimData=ThisStruct{1}.data;
Time=SimData(:,1);
Flow=SimData(:,2);
Ponded=SimData(:,3);
Soil=SimData(:,4);
% fifth column?

ThisStructTile=ReadDataDimNew(fidTile);
SimDataTile=ThisStructTile{1}.data;
TimeTile=SimDataTile(:,1);
FlowTile=SimDataTile(:,2);
PondedTile=SimDataTile(:,3);
SoilTile=SimDataTile(:,4);
% fifth column?
a=figure();

plot(Time,Flow,TimeTile,FlowTile)

xlabel('Time (min)','FontSize',14);

ylabel('Flow (m^3/sec[?])','FontSize',14);
set(gca,'FontSize',14)

legend('No Tile','Tile')

saveas(a,sprintf('TileAndNoTile0.eps'),'epsc')
24 changes: 24 additions & 0 deletions ReadDataDimNew.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
function results = ReadDataDimNew(filename)

fid = fopen(filename,'r');
N = fscanf(fid,'%d',1);
dim = fscanf(fid,'%d',1);

results = cell(N,1);

for i = 1:1:N
A = fscanf(fid,'%d',2);
results{i}.ID = A(1);
results{i}.size = A(2);
size = results{i}.size;

results{i}.data = zeros(size,dim);

for j=1:1:size
A = fscanf(fid,'%f',dim);
results{i}.data(j,1:dim) = A;
end
end

fclose(fid);

Loading

0 comments on commit 7c34f01

Please sign in to comment.