help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: alphabetical list of Octave functions


From: Jaroslav Hajek
Subject: Re: alphabetical list of Octave functions
Date: Wed, 11 Jun 2008 06:42:56 +0200

On Tue, Jun 10, 2008 at 8:59 PM, gOS <address@hidden> wrote:
>
>
>
> John W. Eaton wrote:
>>
>> On 10-Jun-2008, Brian Kirklin wrote:
>>
>> | Do you have a suggestion on how to capture that output? The 2835 items
>> | couldn't be displayed in one terminal for me to just copy and paste the
>> | data out.
>>
>> Just after I sent the message, I realized another way is
>>
>>   x = completion_matches ("");
>>   x(x==0) = "";
>>   x(:,end+1) = "\n";
>>   fid = fopen ("function-list", "w");
>>   fprintf (fid, x');
>>   fclose (fid);
>>
>> It's a little messy because completion matches pads with ASCII nul and
>> doesn't include newline characters.  Maybe there is a simpler way to
>> do it.  You'll also need to strip the file names that are also
>> possible completions, but those should all appear together at the end
>> of the list.
>>
>> jwe
>> _______________________________________________
>> Help-octave mailing list
>> address@hidden
>> https://www.cae.wisc.edu/mailman/listinfo/help-octave
>>
>>
>
> That code almost worked, I found that this worked a little better.
>
>  x = completion_matches ("");
>  x(x==0) = "%";
>  x(:,end+1) = "\n";
>  fid = fopen ("test.txt", "w");
>  fwrite (fid, x');
>  fclose (fid);
>
> Problems:
>
>  x(x==0) = ""; drastically increased the size of the string and started
> doing things I didn't understand. I just used find and replace all inside of
> notepad++  to remove the %. I'm not entirely sure why your method didn't
> work. Also, fprintf didn't record the data properly in windows, but fwrite
> did. Again, not sure why, but I appreciate the help.
>

Even better:

x = completion_matches ("");
x(:,end+1) = "\n";
x = x'(:);
x(x==0) = [];
fid = fopen ("function-list", "w");
fputs (fid, x');
fclose (fid);

> I'm now trying to narrow down the list by removing functions that are
> directly related  to Octave only, simply because no one programming for my
> company should be using something that won't be present in Matlab.

Though I understand what you mean, I can't help noting that you can
certainly implement the missing functions in Matlab.

regards

-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz


reply via email to

[Prev in Thread] Current Thread [Next in Thread]