title: Use a property of a classdef in another .m file?
body: <p>Here is my code:</p>
  
  <p>f.m:</p>
  
  <pre><code>classdef f &lt; handle
      properties (Access = public)
          functionString = '';
          x;
      end
      methods
          function obj = f
              if nargin == 0
                  syms s;
                  obj.x = input('Enter your function: ');
                  obj.functionString = ilaplace(obj.x);
              end
          end
          function value = subsref(obj, a)
              t = a.subs{:};
              value = eval(obj.functionString);
          end
          function display(obj)
          end
      end
  end
  </code></pre>
  
  <p>test.m:</p>
  
  <pre><code>syms s t;
  [n d] = numden(f.x); % Here I want to use x, which is the user input, How can I do such thing?
  zeros = solve(n);
  poles = solve(d);
  disp('The Poles:');
  disp(poles);
  disp('The Zeros:');
  disp(zeros);
  disp('The Result:');
  disp(z(t));
  disp('The Initial Value:');
  disp(z(0));
  disp('The Final Value:');
  disp(z(Inf));
  </code></pre>
  
  <p>When I type test in the command window, it tells me the following:</p>
  
  <pre><code>&gt;&gt; test
  ??? The property 'x' in class 'f' must be accessed from a class instance because it
  is not a Constant property.
  </code></pre>