Hi Levente, <[email protected] substituted for octave-maintain...@...>
Levente Torok wrote: > On Fri, Nov 19, 2010 at 6:45 PM, Philip Nienhuis<[email protected]> > wrote: >> Nov. 17, 2010 Levente Torok wrote: >>> >>> Dear Philip, Carlo and octave-dev, >>> >>> I had a chance to polish things according to your commands. >>> However I have a few questions. >> >> A while later, Levente Torok wrote: >> <snip> >>> >>> I don't fix myself to ML compatibility at all. >>> IO package will be just fine place to have these functions but >>> according to our concept FPL would be even more appropriate. >>> So if you can adjust it to the standards I would be with happy with this. >> >> Hi Levente, >> >> I went through your functions, they look very good. Thank you very much! >> >> Yet I added and changed a few things. Please check if you find this >> acceptable. See below... >> Carlo, if Levente agrees with my fixes/additions, will you put them in fpl >> pkg or shall I do it? >> >> >> But first, a question to Levente: >> (I know nothing about vtk, so apologies if this is a stupid question) >> >> The array X in the example in savevtk's texinfo header is a real array, yet >> the .vtk file that is produced only contains integer values (as the fprintf >> statements invoke %d format specifiers rather than %f). >> Is that intended? >> >> >> savevtk: >> ======== >> - Fixed texinfo >> - Added "See also" (savevtkvector) >> - Fixed small typo (adoptatoin) >> - Added a return value to the function statement (so one can test in scripts >> if savevtk did its job OK). If you don't want to see "ans = 1" you need to >> put a semicolon after the savevtk() statement. >> - Added a default filename "vtkout.vtk". Just remove the '=vtkout.vtk' if >> you don't like this >> - Added basic input argument checking (incl. filename type - should be >> character) >> - Added a try-catch around the fprintf statements to catch disk full errors >> - and you don't need to count dimensions yourself, Octave has a function for >> that: ndims() >> - Minor style changes (spaces etc). >> >> savevtkvector >> ============= >> - Fixed texinfo >> - Added "See also" (savevtkvector) >> - Fixed small typo (adoptatoin) >> - Added a return value to the function statement (so one can test in scripts >> if savevtk did its job OK) >> - Added a default filename "vtkvectorout.vtk". Just remove the >> '=vtkvectorout.vtk' if you don't like this >> - Added basic input argument checking >> - Added a try-catch around the fprintf statements to catch disk full errors >> - I had to replace wrong accents (a.o., ASCII 226, skewed) with ' (straight) >> in almost all fprintf statements - this may be caused by editing witha word >> processor rather than a program editor >> - Minor style changes (spaces etc). >> >> See attached files. >> >> Please tell us if you're OK with the changes. >> >> >> Philip >> > > Dear Philip and Others > > The description of the file format is a but bogus for me however > according to my tests, not only integers %d but floating points can go > into the vtk file. %d format specifier means integer output. Now, savevtk has %d ===> writes integers savevtkvector.m has %f ===> writes floats. Indeed, my tests show that savevtk's output contains an array of integers rather than floats. > I support the idea of default filenames. ( I didn't know if default > parameters can be given in this way. This is grate! ) Told you so, Octave's script language is much better than ML's :-) > I wonder what is the overhead of using try catch. In c++ it could be > really considerable this is why I use it in a place where it is really > the best to use. Considering we're using script language and not compiled code, + we're writing to (potentially slow) storage devices, the overhead from try...catch is very probably negligible. However, the advantages in terms of meaningful error catching are indispensable. > I agree fpl is an appropriate place for these files. > Plus, thanks guys for being so precise in corrections. Thank you for being positive about my (admittedly somewhat picky) suggestions. Carlo / Levente, what do we do with the %d format specifiers in savevtk.m? Oh and Very Soon Now I'll wipe savevtk.m/savevtkvector.m from the io package in svn. Best wishes, Philip ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Octave-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/octave-dev
