Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!news1.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe08.iad.POSTED!7564ea0f!not-for-mail
From: Doug Schwarz <see@sig.for.address.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Re: problem in calling show function in Object oriented
References: <hb5nb0$s06$1@fred.mathworks.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
User-Agent: MT-NewsWatcher/3.5.2 (Intel Mac OS X)
Message-ID: <see-16B817.20104414102009@news.frontiernet.net>
Lines: 47
X-Complaints-To: abuse-news@frontiernet.net
NNTP-Posting-Date: Thu, 15 Oct 2009 00:10:44 UTC
Organization: Frontier
Date: Wed, 14 Oct 2009 20:10:44 -0400
Xref: news.mathworks.com comp.soft-sys.matlab:577380


In article <hb5nb0$s06$1@fred.mathworks.com>,
 "Syed " <cancer216@hotmail.com> wrote:

> classdef points
>     properties
>         x
>         y
>     end
>     methods
>         function pp= point(x,y)
>             this.x=x;
>             this.y=y;
>         end
>         function show()
>             disp('hhehe');
>         end
>     end
> end


Try something like this:


classdef points
    properties
        x
        y
    end
    methods
        function this = point(x,y)
            this.x = x;
            this.y = y;
        end
        function show(this)
            disp('hhehe');
        end
    end
end


By comparing my code with your code it should be obvious what you did 
wrong.

-- 
Doug Schwarz
dmschwarz&ieee,org
Make obvious changes to get real email address.