Carnë, Bilen (is that your first name?): Carnë Draug wrote: > On 23 September 2011 08:11, B. Oytun Peksel<oytun.pek...@gmail.com> wrote: >> 2011/9/22 Carnë Draug<carandraug+...@gmail.com> >>> 2011/9/22 B. Oytun Peksel<oytun.pek...@gmail.com>: >>>> 2011/9/22 Carnë Draug<carandraug+...@gmail.com> >>>>> On 20 September 2011 11:18, B. Oytun Peksel<oytun.pek...@gmail.com> >>>>> wrote: >>>>>> I am trying to write a set of functions for importing data from >>>>>> NASTRAN >>>>>> output files. I've started with import routine for *.pch files for >>>>>> dynamic >>>>>> response. However it is still very slow and resource depending. I >>>>>> think >>>>>> I'll >>>>>> need some help from more experienced developers. >>>>> >>>>> On a quick look at the file, I noticed you don't have a copyright >>>>> notice on the file. Could you add that? >>>>> >>>> Absolutely I can if I had some kind of template to take as an example. >>>> Can >>>> you guide me on that? >>> >>> Take a look at this from imtophat >>> >>> http://octave.svn.sourceforge.net/viewvc/octave/trunk/octave-forge/main/image/inst/imtophat.m?revision=8208&content-type=text%2Fplain >>> >>> If you want to use GPL license, just copy and paste the header from >>> this function (you can replace version 2 by version 3), and replace >>> the names and e-mail with yours. This example also shows a simple >>> example for help text (you can use % instead of # to preserver matlab >>> compatibility). >> >> pch2mat V2. > > Hi, > > apologies for the late reply, I've been traveling the last few days. > > I made a few changes to the file you attached, mostly aesthetic, but > also added a semi-colon and removed the 'disp' to make the function > less verbose. I'm also CC'ing Philip Nienhuis as he is the maintainer > of the IO package since it looks as the most likely place for this > function.
? What is NASTRAN PCH ? Inclusion in the texinfo header of a URL where some info can be found on this subject would be really useful. Otherwise perhaps only a fistful of persons on Earth would know what this is all about. Second: I noted that on ML Central the author (Bilen) posted similar code. As on ML Central only BSD licenses are accepted, and now the code has a GPL licence, perhaps in the header a comment should be made about dual licensing? NB: AFAIU, BSD and GPL are not fully compliant. Other than these two I have no objection against inclusion in the io package. I do think the two thingies above have to be solved first. Anyway I'll probably mark this func (and for that matter, e.g., object2json.m) as "miscellaneous and unmaintained" category until there's more "pch" stuff. As usual, for the sake of quality and neat user experience (read: to satisfy my pickyness), I'd advice to check & if needed fix the the following: - Lacking error checking on the fopen() statement; - No matching fclose() statement; - Are you sure all lines in the file have equal length? If not, a cellstr array may be a better vehicle than a character array; - There's no catch for in case "lines" becomes less or equal than 7 in L.49, or is that no problem? Philip ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ Octave-dev mailing list Octave-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/octave-dev