Rank: 291080 based on 0 downloads (last 30 days) and 0 file submitted
photo

Marc

E-mail
Company/University
ZAMG

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Marc View all
Updated File Comments Rating
30 Jul 2013 GUI Layout Toolbox Layout management objects for MATLAB GUIs Author: Ben Tordoff

@sven & Ben: thats funny, i Run into exactly the same Question today (also because of your icon and thinking about subplot) with my current Project. I can only encourage you to Try and reimplement the "span multiple Grid " Issue. I think it can be Handy for a Lot of practical GUI Applications Or Layouts. Anyway Thanks for your Great work in Thuns toolbox!

02 Jul 2013 ARCGRIDWRITE Write gridded data set in Arc ASCII Grid Format Author: Andrew Stevens

Thanks for this useful submission. However the performance of your code is bad (at least on my (standard) pc). Writing of a 3500 by 6000 matrix would take days on my desktop machine. I looked into your code and replaced your nested for loop (which is a real bottleneck!) containing the fprintf statement by a single one, taking advantage of the list behaviour of the format specifier the fprintf command can take.
specifically i replaced:

%%%START OF YOUR ORIGINAL CODE%%%
%write data
for i=1:mz
for j=1:nz

if j==nz
fprintf(fid,[dc,'\n'],Z(i,j));
else
fprintf(fid,[dc,'\t'],Z(i,j));
end
end
%update waitbar
waitbar(i/mz,h,['Writing file: ',[fname,ext],...
sprintf(' %d%% complete...',round(i/mz*100))])
end

%%%END OF YOUR ORIGINAL CODE%%%

with:

%%%START OF MY MODIFIED VERSION%%%%
test=repmat([dc,'\t'],1,nz);
test(end-1:end)='\n';
%write data
for i=1:mz
fprintf(fid,test,Z(i,:));
%update waitbar
waitbar(i/mz,h,['Writing file: ',[fname,ext],...
sprintf(' %d%% complete...',round(i/mz*100))])
end
%%%END OF MY MODIFIED VERSION%%%

My modified Version takes approx. 10 minutes to write my large array. Maybe you can integrate this in your submission... By the way in ESRI arcmap10 i still have to flipud the imported asc file to display correctly...
Best regards
Marc

Contact us