<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169490</link>
    <title>MATLAB Central Newsreader - Call all methods of an object</title>
    <description>Feed for thread: Call all methods of an object</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2008 by The MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>The MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Fri, 23 May 2008 21:20:29 -0400</pubDate>
      <title>Re: Call all methods of an object</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169490#433776</link>
      <author>thomas.dohmke@gmail.com</author>
      <description>On 18 Mai, 19:21, "per isakson" &amp;lt;poi.nos...@bimDOTkthDOT.se&amp;gt; wrote:&lt;br&gt;
&amp;gt; The tool for Unit Testing that I use, MUNIT (xtargets),&lt;br&gt;
&amp;gt; doesn't work under R2008a. Now I'm looking for a&lt;br&gt;
&amp;gt; replacement.&lt;br&gt;
&lt;br&gt;
I ported my own testing tool, named mlUnit, to R2008a some weeks ago.&lt;br&gt;
The current release is mlUnit 2 Beta 1 (so far I haven't received any&lt;br&gt;
bug reports, so it seems to be quite stable), see&lt;br&gt;
&lt;a href="http://sourceforge.net/projects/mlunit/"&gt;http://sourceforge.net/projects/mlunit/&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&amp;gt; In such a tool one need to run all tests in a file, which&lt;br&gt;
&amp;gt; might be implemented as invoking "all" methods of an&lt;br&gt;
&amp;gt; object.&lt;br&gt;
&lt;br&gt;
Exactly this is possible with mlUnit 2. Example:&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; edit test.sin.m&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;classdef test_sin &amp;lt; mlunit.test_case&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;methods&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;function self = test_sin(varargin)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self = self@mlunit.test_case(varargin{:});&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;function self = test_null(self)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mlunit.assert_equals(0, sin(0));&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;function self = test_sin_cos(self)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mlunit.assert_equals(cos(0), sin(pi/2));&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;br&gt;
&amp;gt;&amp;gt; runner = mlunit.text_test_runner(1, 1);&lt;br&gt;
&amp;gt;&amp;gt; loader = mlunit.test_loader;&lt;br&gt;
&amp;gt;&amp;gt; run(runner, load_tests_from_test_case(loader, 'test_sin'));&lt;br&gt;
&lt;br&gt;
The last statement runs all methods of the class "test_sin", which&lt;br&gt;
have a name beginning with "test". You can also create a method&lt;br&gt;
"set_up" and a method "tear_down" to manage a test fixture, which is&lt;br&gt;
shared by the test methods. A number of examples can be found in&lt;br&gt;
mlUnit's own test cases:&lt;br&gt;
&lt;a href="http://mlunit.svn.sourceforge.net/viewvc/mlunit/mlunit2/trunk/test/"&gt;http://mlunit.svn.sourceforge.net/viewvc/mlunit/mlunit2/trunk/test/&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Hope that helps.&lt;br&gt;
&lt;br&gt;
Thomas&lt;br&gt;
&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Fri, 23 May 2008 21:20:29 -0400</pubDate>
      <title>Re: Call all methods of an object</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169490#495219</link>
      <author>thomas.dohmke@gmail.com</author>
      <description>On 18 Mai, 19:21, "per isakson" &amp;lt;poi.nos...@bimDOTkthDOT.se&amp;gt; wrote:&lt;br&gt;
&amp;gt; The tool for Unit Testing that I use, MUNIT (xtargets),&lt;br&gt;
&amp;gt; doesn't work under R2008a. Now I'm looking for a&lt;br&gt;
&amp;gt; replacement.&lt;br&gt;
&lt;br&gt;
I ported my own testing tool, named mlUnit, to R2008a some weeks ago.&lt;br&gt;
The current release is mlUnit 2 Beta 1 (so far I haven't received any&lt;br&gt;
bug reports, so it seems to be quite stable), see&lt;br&gt;
&lt;a href="http://sourceforge.net/projects/mlunit/"&gt;http://sourceforge.net/projects/mlunit/&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&amp;gt; In such a tool one need to run all tests in a file, which&lt;br&gt;
&amp;gt; might be implemented as invoking "all" methods of an&lt;br&gt;
&amp;gt; object.&lt;br&gt;
&lt;br&gt;
Exactly this is possible with mlUnit 2. Example:&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; edit test.sin.m&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;classdef test_sin &amp;lt; mlunit.test_case&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;methods&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;function self = test_sin(varargin)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self = self@mlunit.test_case(varargin{:});&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;function self = test_null(self)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mlunit.assert_equals(0, sin(0));&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;function self = test_sin_cos(self)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mlunit.assert_equals(cos(0), sin(pi/2));&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;br&gt;
&amp;gt;&amp;gt; runner = mlunit.text_test_runner(1, 1);&lt;br&gt;
&amp;gt;&amp;gt; loader = mlunit.test_loader;&lt;br&gt;
&amp;gt;&amp;gt; run(runner, load_tests_from_test_case(loader, 'test_sin'));&lt;br&gt;
&lt;br&gt;
The last statement runs all methods of the class "test_sin", which&lt;br&gt;
have a name beginning with "test". You can also create a method&lt;br&gt;
"set_up" and a method "tear_down" to manage a test fixture, which is&lt;br&gt;
shared by the test methods. A number of examples can be found in&lt;br&gt;
mlUnit's own test cases:&lt;br&gt;
&lt;a href="http://mlunit.svn.sourceforge.net/viewvc/mlunit/mlunit2/trunk/test/"&gt;http://mlunit.svn.sourceforge.net/viewvc/mlunit/mlunit2/trunk/test/&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Hope that helps.&lt;br&gt;
&lt;br&gt;
Thomas&lt;br&gt;
&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Tue, 20 May 2008 17:47:03 -0400</pubDate>
      <title>Re: Call all methods of an object</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169490#433177</link>
      <author>per isakson</author>
      <description>Doug Schwarz &amp;lt;see@sig.for.address.edu&amp;gt; wrote in message &lt;br&gt;
&amp;lt;snip&amp;gt; &lt;br&gt;
&amp;gt; Per, I don't think you are looking at the right document.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; -- &lt;br&gt;
&amp;gt; Doug Schwarz&lt;br&gt;
&amp;gt; dmschwarz&amp;ieee,org&lt;br&gt;
&amp;gt; Make obvious changes to get real email address.&lt;br&gt;
&lt;br&gt;
Doug, you are perfectly right! I'm not looking the right &lt;br&gt;
document and the reason is that The Mathworks has revised &lt;br&gt;
matlab_oop.pdf sometimes after 02-Mar-2008. I downloaded &lt;br&gt;
the current file, which is slightly bigger, and found the &lt;br&gt;
text you refer to.     &lt;br&gt;
&lt;br&gt;
matlab_oop.pdf  02-Mar-2008 00:24:02  2337282&lt;br&gt;
matlab_oop.pdf  20-May-2008 18:44:21  2341546&lt;br&gt;
&lt;br&gt;
The revision is not noted on page ii. &lt;br&gt;
Revision History&lt;br&gt;
March 2008 Online only New for MATLAB 7.6 (Release 2008a)&lt;br&gt;
&lt;br&gt;
Thank you for making me aware.&lt;br&gt;
&amp;nbsp;&lt;br&gt;
/ per &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Tue, 20 May 2008 17:47:03 -0400</pubDate>
      <title>Re: Call all methods of an object</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169490#494620</link>
      <author>per isakson</author>
      <description>Doug Schwarz &amp;lt;see@sig.for.address.edu&amp;gt; wrote in message &lt;br&gt;
&amp;lt;snip&amp;gt; &lt;br&gt;
&amp;gt; Per, I don't think you are looking at the right document.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; -- &lt;br&gt;
&amp;gt; Doug Schwarz&lt;br&gt;
&amp;gt; dmschwarz&amp;ieee,org&lt;br&gt;
&amp;gt; Make obvious changes to get real email address.&lt;br&gt;
&lt;br&gt;
Doug, you are perfectly right! I'm not looking the right &lt;br&gt;
document and the reason is that The Mathworks has revised &lt;br&gt;
matlab_oop.pdf sometimes after 02-Mar-2008. I downloaded &lt;br&gt;
the current file, which is slightly bigger, and found the &lt;br&gt;
text you refer to.     &lt;br&gt;
&lt;br&gt;
matlab_oop.pdf  02-Mar-2008 00:24:02  2337282&lt;br&gt;
matlab_oop.pdf  20-May-2008 18:44:21  2341546&lt;br&gt;
&lt;br&gt;
The revision is not noted on page ii. &lt;br&gt;
Revision History&lt;br&gt;
March 2008 Online only New for MATLAB 7.6 (Release 2008a)&lt;br&gt;
&lt;br&gt;
Thank you for making me aware.&lt;br&gt;
&amp;nbsp;&lt;br&gt;
/ per &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Tue, 20 May 2008 02:13:18 -0400</pubDate>
      <title>Re: Call all methods of an object</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169490#433033</link>
      <author>Doug Schwarz</author>
      <description>In article &amp;lt;g0sh6p$2pq$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
&amp;nbsp;"per isakson" &amp;lt;poi.nospam@bimDOTkthDOT.se&amp;gt; wrote:&lt;br&gt;
&lt;br&gt;
[snip]&lt;br&gt;
&lt;br&gt;
&amp;gt; Doug, I cannot find the text you refer to. The matter ought &lt;br&gt;
&amp;gt; to be treated in &amp;#8220;MATLAB? 7 Classes and Object-Oriented &lt;br&gt;
&amp;gt; Programming&amp;#8221; on page 7-9 or close. &lt;br&gt;
&lt;br&gt;
I found it.  Quoting from matlab_oop.pdf for R2008a, beginning on page &lt;br&gt;
7-10:&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Referencing Names with Expressions&#8249;Dynamic Reference&lt;br&gt;
&lt;br&gt;
You can reference an object&#185;s properties or methods using an expression &lt;br&gt;
in dot-parentheses syntax:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;obj.(expression) &lt;br&gt;
&lt;br&gt;
The expression must evaluate to a string that is the name of a property &lt;br&gt;
or a method. For example, the following statements are equivalent:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;obj.Property1 &lt;br&gt;
&amp;nbsp;&amp;nbsp;obj.('Property1')&lt;br&gt;
&lt;br&gt;
In this case, obj is an object of a class that defines a property called &lt;br&gt;
Property1. Therefore, you can pass a string variable in the parentheses &lt;br&gt;
to reference to property:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;propName = 'Property1';&lt;br&gt;
&amp;nbsp;&amp;nbsp;obj.(propName)&lt;br&gt;
&lt;br&gt;
You can call a method and pass input arguments to the method using &lt;br&gt;
another set of parentheses:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;obj.(expression)(arg1,arg2,...)&lt;br&gt;
&lt;br&gt;
Using this notation, you can make dynamic references to properties and &lt;br&gt;
methods in the same way you can create dynamic references to the fields &lt;br&gt;
of structs (see &#179;Using Dynamic Field Names&#178; for information on MATLAB &lt;br&gt;
structures).&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Per, I don't think you are looking at the right document.&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Doug Schwarz&lt;br&gt;
dmschwarz&amp;ieee,org&lt;br&gt;
Make obvious changes to get real email address.&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Tue, 20 May 2008 02:13:18 -0400</pubDate>
      <title>Re: Call all methods of an object</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169490#494476</link>
      <author>Doug Schwarz</author>
      <description>In article &amp;lt;g0sh6p$2pq$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
&amp;nbsp;"per isakson" &amp;lt;poi.nospam@bimDOTkthDOT.se&amp;gt; wrote:&lt;br&gt;
&lt;br&gt;
[snip]&lt;br&gt;
&lt;br&gt;
&amp;gt; Doug, I cannot find the text you refer to. The matter ought &lt;br&gt;
&amp;gt; to be treated in &amp;#8220;MATLAB? 7 Classes and Object-Oriented &lt;br&gt;
&amp;gt; Programming&amp;#8221; on page 7-9 or close. &lt;br&gt;
&lt;br&gt;
I found it.  Quoting from matlab_oop.pdf for R2008a, beginning on page &lt;br&gt;
7-10:&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Referencing Names with Expressions&#8249;Dynamic Reference&lt;br&gt;
&lt;br&gt;
You can reference an object&#185;s properties or methods using an expression &lt;br&gt;
in dot-parentheses syntax:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;obj.(expression) &lt;br&gt;
&lt;br&gt;
The expression must evaluate to a string that is the name of a property &lt;br&gt;
or a method. For example, the following statements are equivalent:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;obj.Property1 &lt;br&gt;
&amp;nbsp;&amp;nbsp;obj.('Property1')&lt;br&gt;
&lt;br&gt;
In this case, obj is an object of a class that defines a property called &lt;br&gt;
Property1. Therefore, you can pass a string variable in the parentheses &lt;br&gt;
to reference to property:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;propName = 'Property1';&lt;br&gt;
&amp;nbsp;&amp;nbsp;obj.(propName)&lt;br&gt;
&lt;br&gt;
You can call a method and pass input arguments to the method using &lt;br&gt;
another set of parentheses:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;obj.(expression)(arg1,arg2,...)&lt;br&gt;
&lt;br&gt;
Using this notation, you can make dynamic references to properties and &lt;br&gt;
methods in the same way you can create dynamic references to the fields &lt;br&gt;
of structs (see &#179;Using Dynamic Field Names&#178; for information on MATLAB &lt;br&gt;
structures).&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Per, I don't think you are looking at the right document.&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Doug Schwarz&lt;br&gt;
dmschwarz&amp;ieee,org&lt;br&gt;
Make obvious changes to get real email address.&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Mon, 19 May 2008 18:34:01 -0400</pubDate>
      <title>Re: Call all methods of an object</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169490#432991</link>
      <author>per isakson</author>
      <description>"Steven Lord" &amp;lt;slord@mathworks.com&amp;gt; wrote in message &lt;br&gt;
&amp;lt;g0qfcu$tp$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; "per isakson" &amp;lt;poi.nospam@bimDOTkthDOT.se&amp;gt; wrote in &lt;br&gt;
message &lt;br&gt;
&amp;gt; news:g0pohu$sji$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; &amp;gt; The tool for Unit Testing that I use, MUNIT (xtargets),&lt;br&gt;
&amp;gt; &amp;gt; doesn't work under R2008a. Now I'm looking for a&lt;br&gt;
&amp;gt; &amp;gt; replacement.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; In such a tool one need to run all tests in a file, &lt;br&gt;
which&lt;br&gt;
&amp;gt; &amp;gt; might be implemented as invoking "all" methods of an&lt;br&gt;
&amp;gt; &amp;gt; object. What would be the best way to do that? The &lt;br&gt;
feature&lt;br&gt;
&amp;gt; &amp;gt; demonstrated by this example looks useful. However, is &lt;br&gt;
it&lt;br&gt;
&amp;gt; &amp;gt; documented?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I'd do this using the METHODS function to obtain the list &lt;br&gt;
of methods, then &lt;br&gt;
&amp;gt; use FEVAL to evaluate the method or use STR2FUNC to &lt;br&gt;
create a function handle &lt;br&gt;
&amp;gt; to the method and invoke that using the regular &lt;br&gt;
functionHandle() syntax.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/me"&gt;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/me&lt;/a&gt;&lt;br&gt;
thods.html&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; -- &lt;br&gt;
&amp;gt; Steve Lord&lt;br&gt;
&amp;gt; slord@mathworks.com &lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
I guess I raised three different questions: &lt;br&gt;
1. How to know for sure that an operational feature in &lt;br&gt;
Matlab is NOT documented*?&lt;br&gt;
2. Is the calling syntax: object.(&amp;#8216;method1&amp;#8217;) documented?&lt;br&gt;
3. A vague question on a design detail of a unit test &lt;br&gt;
framework.&lt;br&gt;
&lt;br&gt;
*) documented meaning that The Mathworks promises that the &lt;br&gt;
feature will work in future versions of Matlab.&lt;br&gt;
&lt;br&gt;
Background: I have a large number of test and a broken unit &lt;br&gt;
testing framework. Three(?) years ago I thought that it was &lt;br&gt;
safe to use &amp;#8220;evalin(&amp;#8216;caller&amp;#8217;,&amp;#8216;@name&amp;#8217;)&amp;#8221; (wishful thinking?). &lt;br&gt;
&lt;br&gt;
I had something like the following in mind:&lt;br&gt;
&lt;br&gt;
for ca = list_of_tests&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;obj.setup()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;#8230; obj.(ca{:})&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;obj.teardown()&lt;br&gt;
end&lt;br&gt;
&lt;br&gt;
Where list_of_tests is a cell array of strings holding &lt;br&gt;
names of methods, each of which implements a test. &lt;br&gt;
&lt;br&gt;
Doug, I cannot find the text you refer to. The matter ought &lt;br&gt;
to be treated in &amp;#8220;MATLAB? 7 Classes and Object-Oriented &lt;br&gt;
Programming&amp;#8221; on page 7-9 or close. &lt;br&gt;
&lt;br&gt;
Steve, you propose two alternatives to &amp;#8220;object.( &lt;br&gt;
strName )&amp;#8221;, but avoid the question whether it is &lt;br&gt;
documented. Thus, I should be wise and use one of your &lt;br&gt;
alternatives. &lt;br&gt;
&lt;br&gt;
Loren and ImageAnalyst, indeed the signatures of the &lt;br&gt;
methods must be known beforehand. Thus, the methods, which &lt;br&gt;
implement test, must honor a given signature.&lt;br&gt;
&lt;br&gt;
Thank you for your answeres&lt;br&gt;
Per&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Mon, 19 May 2008 18:34:01 -0400</pubDate>
      <title>Re: Call all methods of an object</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169490#494434</link>
      <author>per isakson</author>
      <description>"Steven Lord" &amp;lt;slord@mathworks.com&amp;gt; wrote in message &lt;br&gt;
&amp;lt;g0qfcu$tp$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; "per isakson" &amp;lt;poi.nospam@bimDOTkthDOT.se&amp;gt; wrote in &lt;br&gt;
message &lt;br&gt;
&amp;gt; news:g0pohu$sji$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; &amp;gt; The tool for Unit Testing that I use, MUNIT (xtargets),&lt;br&gt;
&amp;gt; &amp;gt; doesn't work under R2008a. Now I'm looking for a&lt;br&gt;
&amp;gt; &amp;gt; replacement.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; In such a tool one need to run all tests in a file, &lt;br&gt;
which&lt;br&gt;
&amp;gt; &amp;gt; might be implemented as invoking "all" methods of an&lt;br&gt;
&amp;gt; &amp;gt; object. What would be the best way to do that? The &lt;br&gt;
feature&lt;br&gt;
&amp;gt; &amp;gt; demonstrated by this example looks useful. However, is &lt;br&gt;
it&lt;br&gt;
&amp;gt; &amp;gt; documented?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I'd do this using the METHODS function to obtain the list &lt;br&gt;
of methods, then &lt;br&gt;
&amp;gt; use FEVAL to evaluate the method or use STR2FUNC to &lt;br&gt;
create a function handle &lt;br&gt;
&amp;gt; to the method and invoke that using the regular &lt;br&gt;
functionHandle() syntax.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/me"&gt;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/me&lt;/a&gt;&lt;br&gt;
thods.html&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; -- &lt;br&gt;
&amp;gt; Steve Lord&lt;br&gt;
&amp;gt; slord@mathworks.com &lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
I guess I raised three different questions: &lt;br&gt;
1. How to know for sure that an operational feature in &lt;br&gt;
Matlab is NOT documented*?&lt;br&gt;
2. Is the calling syntax: object.(&amp;#8216;method1&amp;#8217;) documented?&lt;br&gt;
3. A vague question on a design detail of a unit test &lt;br&gt;
framework.&lt;br&gt;
&lt;br&gt;
*) documented meaning that The Mathworks promises that the &lt;br&gt;
feature will work in future versions of Matlab.&lt;br&gt;
&lt;br&gt;
Background: I have a large number of test and a broken unit &lt;br&gt;
testing framework. Three(?) years ago I thought that it was &lt;br&gt;
safe to use &amp;#8220;evalin(&amp;#8216;caller&amp;#8217;,&amp;#8216;@name&amp;#8217;)&amp;#8221; (wishful thinking?). &lt;br&gt;
&lt;br&gt;
I had something like the following in mind:&lt;br&gt;
&lt;br&gt;
for ca = list_of_tests&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;obj.setup()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;#8230; obj.(ca{:})&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;obj.teardown()&lt;br&gt;
end&lt;br&gt;
&lt;br&gt;
Where list_of_tests is a cell array of strings holding &lt;br&gt;
names of methods, each of which implements a test. &lt;br&gt;
&lt;br&gt;
Doug, I cannot find the text you refer to. The matter ought &lt;br&gt;
to be treated in &amp;#8220;MATLAB? 7 Classes and Object-Oriented &lt;br&gt;
Programming&amp;#8221; on page 7-9 or close. &lt;br&gt;
&lt;br&gt;
Steve, you propose two alternatives to &amp;#8220;object.( &lt;br&gt;
strName )&amp;#8221;, but avoid the question whether it is &lt;br&gt;
documented. Thus, I should be wise and use one of your &lt;br&gt;
alternatives. &lt;br&gt;
&lt;br&gt;
Loren and ImageAnalyst, indeed the signatures of the &lt;br&gt;
methods must be known beforehand. Thus, the methods, which &lt;br&gt;
implement test, must honor a given signature.&lt;br&gt;
&lt;br&gt;
Thank you for your answeres&lt;br&gt;
Per&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Mon, 19 May 2008 14:54:51 -0400</pubDate>
      <title>Re: Call all methods of an object</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169490#432921</link>
      <author>ImageAnalyst</author>
      <description>On May 19, 7:51=A0am, Loren Shure &amp;lt;lo...@mathworks.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; In article &amp;lt;a8af7cd9-686d-422f-afd6-1f184e74bb23&lt;br&gt;
&amp;gt; @m3g2000hsc.googlegroups.com&amp;gt;, imageanal...@mailinator.com says...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; On May 18, 7:50=A0pm, "Steven Lord" &amp;lt;sl...@mathworks.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; "per isakson" &amp;lt;poi.nos...@bimDOTkthDOT.se&amp;gt; wrote in message&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;news:g0pohu$sji$1@fred.mathworks.com...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; The tool for Unit Testing that I use, MUNIT (xtargets),&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; doesn't work under R2008a. Now I'm looking for a&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; replacement.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; In such a tool one need to run all tests in a file, which&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; might be implemented as invoking "all" methods of an&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; object. What would be the best way to do that? The feature&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; demonstrated by this example looks useful. However, is it&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; documented?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; I'd do this using the METHODS function to obtain the list of methods, =&lt;br&gt;
then&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; use FEVAL to evaluate the method or use STR2FUNC to create a function =&lt;br&gt;
handle&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; to the method and invoke that using the regular functionHandle() synta=&lt;br&gt;
x.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/methods.html"&gt;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/methods.html&lt;/a&gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; --&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Steve Lord&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; sl...@mathworks.com&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; -------------------------------------------------------&lt;br&gt;
&amp;gt; &amp;gt; If you don't know the methods in advance, and have to get their names&lt;br&gt;
&amp;gt; &amp;gt; from the METHODS function, then how do you know what arguments to pass&lt;br&gt;
&amp;gt; &amp;gt; to those methods? =A0Calling a method without passing it the proper&lt;br&gt;
&amp;gt; &amp;gt; arguments will likely cause an exception.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; You may be able to use nargin and nargout to help with this, but it's&lt;br&gt;
&amp;gt; not a full solution:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &lt;a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/nargin.html"&gt;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/nargin.html&lt;/a&gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; --&lt;br&gt;
&amp;gt; Loren&lt;a href="http://blogs.mathworks.com/loren/-"&gt;http://blogs.mathworks.com/loren/-&lt;/a&gt; Hide quoted text -&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; - Show quoted text -&lt;br&gt;
&lt;br&gt;
------------------------------------------------------------------------&lt;br&gt;
That just gets you the number of arguments it's expecting.&lt;br&gt;
&lt;br&gt;
I still assert that mindlessly calling a function without knowing what&lt;br&gt;
the function expects, or what you should expect in return, is&lt;br&gt;
worthless.  You MUST know what you're doing.&lt;br&gt;
&lt;br&gt;
For example, maybe I can call function/method m1 and pass it a string&lt;br&gt;
filename and it will be happy (say it just displays an image file),&lt;br&gt;
but passing a string into m2 may throw an exception (maybe the file&lt;br&gt;
doesn't exist or maybe m2 multiplies the argument by pi).  And if you&lt;br&gt;
don't know what the name is, then you don't know what it's expected to&lt;br&gt;
do, so how can you possibly tell if it's operating properly by&lt;br&gt;
checking its return value?  Say I call m1 and pass in, oh say 35&lt;br&gt;
(randomly pulled from my hat), and I get out, oh say 90.  If I didn't&lt;br&gt;
even know the name of the function, nor what it does, then how can I&lt;br&gt;
be assured that 90 is the correct answer?  So what's the point?  This&lt;br&gt;
is no way to check a function (do a "Performance Qualification with a&lt;br&gt;
check sample" to use proper QA lingo) or do unit tests, unless I've&lt;br&gt;
seriously misunderstood what the intent was.&lt;br&gt;
Regards,&lt;br&gt;
ImageAnalyst&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Mon, 19 May 2008 14:54:51 -0400</pubDate>
      <title>Re: Call all methods of an object</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169490#494364</link>
      <author>ImageAnalyst</author>
      <description>On May 19, 7:51=A0am, Loren Shure &amp;lt;lo...@mathworks.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; In article &amp;lt;a8af7cd9-686d-422f-afd6-1f184e74bb23&lt;br&gt;
&amp;gt; @m3g2000hsc.googlegroups.com&amp;gt;, imageanal...@mailinator.com says...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; On May 18, 7:50=A0pm, "Steven Lord" &amp;lt;sl...@mathworks.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; "per isakson" &amp;lt;poi.nos...@bimDOTkthDOT.se&amp;gt; wrote in message&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;news:g0pohu$sji$1@fred.mathworks.com...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; The tool for Unit Testing that I use, MUNIT (xtargets),&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; doesn't work under R2008a. Now I'm looking for a&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; replacement.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; In such a tool one need to run all tests in a file, which&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; might be implemented as invoking "all" methods of an&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; object. What would be the best way to do that? The feature&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; demonstrated by this example looks useful. However, is it&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; documented?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; I'd do this using the METHODS function to obtain the list of methods, =&lt;br&gt;
then&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; use FEVAL to evaluate the method or use STR2FUNC to create a function =&lt;br&gt;
handle&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; to the method and invoke that using the regular functionHandle() synta=&lt;br&gt;
x.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/methods.html"&gt;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/methods.html&lt;/a&gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; --&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Steve Lord&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; sl...@mathworks.com&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; -------------------------------------------------------&lt;br&gt;
&amp;gt; &amp;gt; If you don't know the methods in advance, and have to get their names&lt;br&gt;
&amp;gt; &amp;gt; from the METHODS function, then how do you know what arguments to pass&lt;br&gt;
&amp;gt; &amp;gt; to those methods? =A0Calling a method without passing it the proper&lt;br&gt;
&amp;gt; &amp;gt; arguments will likely cause an exception.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; You may be able to use nargin and nargout to help with this, but it's&lt;br&gt;
&amp;gt; not a full solution:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &lt;a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/nargin.html"&gt;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/nargin.html&lt;/a&gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; --&lt;br&gt;
&amp;gt; Loren&lt;a href="http://blogs.mathworks.com/loren/-"&gt;http://blogs.mathworks.com/loren/-&lt;/a&gt; Hide quoted text -&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; - Show quoted text -&lt;br&gt;
&lt;br&gt;
------------------------------------------------------------------------&lt;br&gt;
That just gets you the number of arguments it's expecting.&lt;br&gt;
&lt;br&gt;
I still assert that mindlessly calling a function without knowing what&lt;br&gt;
the function expects, or what you should expect in return, is&lt;br&gt;
worthless.  You MUST know what you're doing.&lt;br&gt;
&lt;br&gt;
For example, maybe I can call function/method m1 and pass it a string&lt;br&gt;
filename and it will be happy (say it just displays an image file),&lt;br&gt;
but passing a string into m2 may throw an exception (maybe the file&lt;br&gt;
doesn't exist or maybe m2 multiplies the argument by pi).  And if you&lt;br&gt;
don't know what the name is, then you don't know what it's expected to&lt;br&gt;
do, so how can you possibly tell if it's operating properly by&lt;br&gt;
checking its return value?  Say I call m1 and pass in, oh say 35&lt;br&gt;
(randomly pulled from my hat), and I get out, oh say 90.  If I didn't&lt;br&gt;
even know the name of the function, nor what it does, then how can I&lt;br&gt;
be assured that 90 is the correct answer?  So what's the point?  This&lt;br&gt;
is no way to check a function (do a "Performance Qualification with a&lt;br&gt;
check sample" to use proper QA lingo) or do unit tests, unless I've&lt;br&gt;
seriously misunderstood what the intent was.&lt;br&gt;
Regards,&lt;br&gt;
ImageAnalyst&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Mon, 19 May 2008 11:51:19 -0400</pubDate>
      <title>Re: Call all methods of an object</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169490#432871</link>
      <author>Loren Shure</author>
      <description>In article &amp;lt;a8af7cd9-686d-422f-afd6-1f184e74bb23&lt;br&gt;
@m3g2000hsc.googlegroups.com&amp;gt;, imageanalyst@mailinator.com says...&lt;br&gt;
&amp;gt; On May 18, 7:50=A0pm, "Steven Lord" &amp;lt;sl...@mathworks.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; &amp;gt; "per isakson" &amp;lt;poi.nos...@bimDOTkthDOT.se&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; news:g0pohu$sji$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; The tool for Unit Testing that I use, MUNIT (xtargets),&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; doesn't work under R2008a. Now I'm looking for a&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; replacement.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; In such a tool one need to run all tests in a file, which&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; might be implemented as invoking "all" methods of an&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; object. What would be the best way to do that? The feature&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; demonstrated by this example looks useful. However, is it&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; documented?&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; I'd do this using the METHODS function to obtain the list of methods, t=&lt;br&gt;
hen&lt;br&gt;
&amp;gt; &amp;gt; use FEVAL to evaluate the method or use STR2FUNC to create a function h=&lt;br&gt;
andle&lt;br&gt;
&amp;gt; &amp;gt; to the method and invoke that using the regular functionHandle() syntax=&lt;br&gt;
.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &lt;a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/methods.html"&gt;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/methods.html&lt;/a&gt;&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; --&lt;br&gt;
&amp;gt; &amp;gt; Steve Lord&lt;br&gt;
&amp;gt; &amp;gt; sl...@mathworks.com&lt;br&gt;
&amp;gt;=20&lt;br&gt;
&amp;gt; -------------------------------------------------------&lt;br&gt;
&amp;gt; If you don't know the methods in advance, and have to get their names&lt;br&gt;
&amp;gt; from the METHODS function, then how do you know what arguments to pass&lt;br&gt;
&amp;gt; to those methods?  Calling a method without passing it the proper&lt;br&gt;
&amp;gt; arguments will likely cause an exception.&lt;br&gt;
&amp;gt;=20&lt;br&gt;
&lt;br&gt;
You may be able to use nargin and nargout to help with this, but it's=20&lt;br&gt;
not a full solution:&lt;br&gt;
&lt;br&gt;
&lt;a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/nargin.html"&gt;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/nargin.html&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
--=20&lt;br&gt;
Loren&lt;br&gt;
&lt;a href="http://blogs.mathworks.com/loren/"&gt;http://blogs.mathworks.com/loren/&lt;/a&gt;&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Mon, 19 May 2008 11:51:19 -0400</pubDate>
      <title>Re: Call all methods of an object</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169490#494314</link>
      <author>Loren Shure</author>
      <description>In article &amp;lt;a8af7cd9-686d-422f-afd6-1f184e74bb23&lt;br&gt;
@m3g2000hsc.googlegroups.com&amp;gt;, imageanalyst@mailinator.com says...&lt;br&gt;
&amp;gt; On May 18, 7:50=A0pm, "Steven Lord" &amp;lt;sl...@mathworks.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; &amp;gt; "per isakson" &amp;lt;poi.nos...@bimDOTkthDOT.se&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; news:g0pohu$sji$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; The tool for Unit Testing that I use, MUNIT (xtargets),&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; doesn't work under R2008a. Now I'm looking for a&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; replacement.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; In such a tool one need to run all tests in a file, which&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; might be implemented as invoking "all" methods of an&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; object. What would be the best way to do that? The feature&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; demonstrated by this example looks useful. However, is it&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; documented?&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; I'd do this using the METHODS function to obtain the list of methods, t=&lt;br&gt;
hen&lt;br&gt;
&amp;gt; &amp;gt; use FEVAL to evaluate the method or use STR2FUNC to create a function h=&lt;br&gt;
andle&lt;br&gt;
&amp;gt; &amp;gt; to the method and invoke that using the regular functionHandle() syntax=&lt;br&gt;
.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &lt;a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/methods.html"&gt;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/methods.html&lt;/a&gt;&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; --&lt;br&gt;
&amp;gt; &amp;gt; Steve Lord&lt;br&gt;
&amp;gt; &amp;gt; sl...@mathworks.com&lt;br&gt;
&amp;gt;=20&lt;br&gt;
&amp;gt; -------------------------------------------------------&lt;br&gt;
&amp;gt; If you don't know the methods in advance, and have to get their names&lt;br&gt;
&amp;gt; from the METHODS function, then how do you know what arguments to pass&lt;br&gt;
&amp;gt; to those methods?  Calling a method without passing it the proper&lt;br&gt;
&amp;gt; arguments will likely cause an exception.&lt;br&gt;
&amp;gt;=20&lt;br&gt;
&lt;br&gt;
You may be able to use nargin and nargout to help with this, but it's=20&lt;br&gt;
not a full solution:&lt;br&gt;
&lt;br&gt;
&lt;a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/nargin.html"&gt;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/nargin.html&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
--=20&lt;br&gt;
Loren&lt;br&gt;
&lt;a href="http://blogs.mathworks.com/loren/"&gt;http://blogs.mathworks.com/loren/&lt;/a&gt;&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Mon, 19 May 2008 00:48:32 -0400</pubDate>
      <title>Re: Call all methods of an object</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169490#432787</link>
      <author>ImageAnalyst</author>
      <description>On May 18, 7:50=A0pm, "Steven Lord" &amp;lt;sl...@mathworks.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; "per isakson" &amp;lt;poi.nos...@bimDOTkthDOT.se&amp;gt; wrote in message&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; news:g0pohu$sji$1@fred.mathworks.com...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; The tool for Unit Testing that I use, MUNIT (xtargets),&lt;br&gt;
&amp;gt; &amp;gt; doesn't work under R2008a. Now I'm looking for a&lt;br&gt;
&amp;gt; &amp;gt; replacement.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; In such a tool one need to run all tests in a file, which&lt;br&gt;
&amp;gt; &amp;gt; might be implemented as invoking "all" methods of an&lt;br&gt;
&amp;gt; &amp;gt; object. What would be the best way to do that? The feature&lt;br&gt;
&amp;gt; &amp;gt; demonstrated by this example looks useful. However, is it&lt;br&gt;
&amp;gt; &amp;gt; documented?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I'd do this using the METHODS function to obtain the list of methods, then=&lt;br&gt;
&lt;br&gt;
&amp;gt; use FEVAL to evaluate the method or use STR2FUNC to create a function hand=&lt;br&gt;
le&lt;br&gt;
&amp;gt; to the method and invoke that using the regular functionHandle() syntax.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &lt;a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/methods.html"&gt;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/methods.html&lt;/a&gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; --&lt;br&gt;
&amp;gt; Steve Lord&lt;br&gt;
&amp;gt; sl...@mathworks.com&lt;br&gt;
&lt;br&gt;
-------------------------------------------------------&lt;br&gt;
If you don't know the methods in advance, and have to get their names&lt;br&gt;
from the METHODS function, then how do you know what arguments to pass&lt;br&gt;
to those methods?  Calling a method without passing it the proper&lt;br&gt;
arguments will likely cause an exception.&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Mon, 19 May 2008 00:48:32 -0400</pubDate>
      <title>Re: Call all methods of an object</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169490#494230</link>
      <author>ImageAnalyst</author>
      <description>On May 18, 7:50=A0pm, "Steven Lord" &amp;lt;sl...@mathworks.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; "per isakson" &amp;lt;poi.nos...@bimDOTkthDOT.se&amp;gt; wrote in message&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; news:g0pohu$sji$1@fred.mathworks.com...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; The tool for Unit Testing that I use, MUNIT (xtargets),&lt;br&gt;
&amp;gt; &amp;gt; doesn't work under R2008a. Now I'm looking for a&lt;br&gt;
&amp;gt; &amp;gt; replacement.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; In such a tool one need to run all tests in a file, which&lt;br&gt;
&amp;gt; &amp;gt; might be implemented as invoking "all" methods of an&lt;br&gt;
&amp;gt; &amp;gt; object. What would be the best way to do that? The feature&lt;br&gt;
&amp;gt; &amp;gt; demonstrated by this example looks useful. However, is it&lt;br&gt;
&amp;gt; &amp;gt; documented?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I'd do this using the METHODS function to obtain the list of methods, then=&lt;br&gt;
&lt;br&gt;
&amp;gt; use FEVAL to evaluate the method or use STR2FUNC to create a function hand=&lt;br&gt;
le&lt;br&gt;
&amp;gt; to the method and invoke that using the regular functionHandle() syntax.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &lt;a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/methods.html"&gt;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/methods.html&lt;/a&gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; --&lt;br&gt;
&amp;gt; Steve Lord&lt;br&gt;
&amp;gt; sl...@mathworks.com&lt;br&gt;
&lt;br&gt;
-------------------------------------------------------&lt;br&gt;
If you don't know the methods in advance, and have to get their names&lt;br&gt;
from the METHODS function, then how do you know what arguments to pass&lt;br&gt;
to those methods?  Calling a method without passing it the proper&lt;br&gt;
arguments will likely cause an exception.&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Sun, 18 May 2008 23:50:54 -0400</pubDate>
      <title>Re: Call all methods of an object</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169490#432785</link>
      <author>Steven Lord</author>
      <description>&lt;br&gt;
"per isakson" &amp;lt;poi.nospam@bimDOTkthDOT.se&amp;gt; wrote in message &lt;br&gt;
news:g0pohu$sji$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; The tool for Unit Testing that I use, MUNIT (xtargets),&lt;br&gt;
&amp;gt; doesn't work under R2008a. Now I'm looking for a&lt;br&gt;
&amp;gt; replacement.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; In such a tool one need to run all tests in a file, which&lt;br&gt;
&amp;gt; might be implemented as invoking "all" methods of an&lt;br&gt;
&amp;gt; object. What would be the best way to do that? The feature&lt;br&gt;
&amp;gt; demonstrated by this example looks useful. However, is it&lt;br&gt;
&amp;gt; documented?&lt;br&gt;
&lt;br&gt;
I'd do this using the METHODS function to obtain the list of methods, then &lt;br&gt;
use FEVAL to evaluate the method or use STR2FUNC to create a function handle &lt;br&gt;
to the method and invoke that using the regular functionHandle() syntax.&lt;br&gt;
&lt;br&gt;
&lt;a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/methods.html"&gt;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/methods.html&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Steve Lord&lt;br&gt;
slord@mathworks.com &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
</description>
    </item>
  </channel>
</rss>
