FAQ: Difference between revisions

3 bytes removed ,  24 November 2011
m
→‎do xxxx?: small text improvement
m (→‎do xxxx?: small text improvement)
Line 311: Line 311:
==do xxxx?==
==do xxxx?==


You are probably looking for the function ''lookfor''. This function searches the help text of all functions for a specific string and returns the list of functions that have. By default only searches the first line of the help text of each so use '''help lookfor'' at the octave prompt to learn more. The following example helps to find the function to calculate correlation coefficient in a matrix
You are probably looking for the function ''lookfor''. This function searches the help text of all functions for a specific string and returns a list of functions. Note that by default it will only search the first line of the help text (check ''help lookfor'' at the octave prompt for more). The following example helps to find the function to calculate correlation coefficient in a matrix:


   octave:1> lookfor ("correlation")
   octave:1> lookfor ("correlation")
Line 320: Line 320:
   autocor            Return the autocorrelations from lag 0 to H of vector X.
   autocor            Return the autocorrelations from lag 0 to H of vector X.


Also, there's a high chance that the function name has a suggestive name so you can try auto-completion to get some hints. For the previous example, typing ''corr'' at the octave promp followed by pressing [Tab] twice would suggest the following:
Also, there's a high chance that the function name has a suggestive name, and so you can try auto-completion to get some hints. For the previous example, typing ''corr'' at the octave promp followed by pressing [Tab] twice would suggest the following:


   octave:2> corr
   octave:2> corr