The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: static properties
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  

Posts: 16
Registered: 5/15/09
static properties
Posted: Feb 14, 2013 11:51 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

In C++ class data members may be declared static. That is, regardless of the number of instances that exist, only one copy of the static data exists which is accessible to all instances of the class.

Is there any way to implement this type of functionality within MATLAB?

C++ Syntax, as a header.
class person
person(string name);
string setName();
string getName();

static int getNumPeople();
string name;

static int numPeople; // I want to implement the functionality of this property.

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.