{"id":233,"date":"2008-07-28T08:05:09","date_gmt":"2008-07-28T13:05:09","guid":{"rendered":"https:\/\/blogs.mathworks.com\/desktop\/2008\/07\/28\/seeing-also\/"},"modified":"2016-04-03T15:29:59","modified_gmt":"2016-04-03T19:29:59","slug":"seeing-also","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/community\/2008\/07\/28\/seeing-also\/","title":{"rendered":"Seeing also"},"content":{"rendered":"<p>Quan recently <a href=\"https:\/\/blogs.mathworks.com\/community\/2008\/07\/14\/browsing-vs-searching\/#comment-5238\">commented<\/a> that he uses the &#8220;see also&#8221; part of M-file help as a way of finding related functions.<\/p>\n<p>This made me think back to my early days writing MATLAB code, where my TA would take off points for not including help comments at the top of every M-file. Including a See Also is a nice way to build a graph of related functions, and it helps your users understand the relationship between files. I use it most when trying to find an exact function in a related family of functions, usually from one of the string or matrix manipulation functions.<\/p>\n<p>We started out just by adding the See Also for related functions in the M-file help, as you can see in the following MATLAB 5.0 help for <tt>findstr<\/tt>.<\/p>\n<div align=\"center\"><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/desktop\/michael_katz_see_also\/r5seealso.jpg\" alt=\"FINDSTR HELP: v5\" border=\"0\" \/><\/div>\n<p>By the time we got to MATLAB R2008a, the <tt>findstr<\/tt> doc was expanded a bit, and the functions in the <tt>see also<\/tt> were hyperlinks to their respective functions.<\/p>\n<div align=\"center\"><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/desktop\/michael_katz_see_also\/r2008aseealso.jpg\" alt=\"FINDSTR HELP: R2008a\" border=\"0\" \/><\/div>\n<p>When you write your own M-files, you too can get the hyperlinks for free. Just add a <tt><span style=\"color: green;\">%see also <em>function1<\/em>, <em>function2<\/em>, etc...<\/span><\/tt> line to the help section of your script or function, and MATLAB takes care of the rest.<\/p>\n<p>We also provide a Help Report that scans the M-files in a directory and will let you know if you missed any &#8220;see also&#8221; lines in your M-files.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Quan recently commented that he uses the &#8220;see also&#8221; part of M-file help as a way of finding related functions.<br \/>\nThis made me think back to my early days writing MATLAB code, where my TA&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/community\/2008\/07\/28\/seeing-also\/\">read more >><\/a><\/p>\n","protected":false},"author":38,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[2,11],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/233"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/users\/38"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/comments?post=233"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/233\/revisions"}],"predecessor-version":[{"id":3401,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/233\/revisions\/3401"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/media?parent=233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/categories?post=233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/tags?post=233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}