Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8429491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:21:15+00:00 2026-06-10T05:21:15+00:00

I using pre-existing code in matlab that is organized into classes. Instead of using

  • 0

I using pre-existing code in matlab that is organized into classes. Instead of using classdef it uses @folder’s. I’m not entirely sure exactly how it works and its causing me some trouble.

The constructor format is as follows:

function this = crazy_class(varargin)

    this.a = [];
    this.b = [];
    this = class(this, 'crazy_class'); 

end

I need to add a new property to the class, but if i modify it as so:

function this = crazy_class(varargin)

    this.a = [];
    this.b = [];
    this.newProperty = [];
    this = class(this, 'crazy_class'); 

end

I get the following:

Number of fields for class crazy_class cannot be changed without clear classes.

It doesn’t like me adding a new unspecified property to the class. Fair enough, if there was a classdef, adding a new property would be simple, however I have no idea how to do this with the @folder format.

There is no .m file, or any file for that matter in the folder that specifies any properties for the class. The closest thing I can find are the overloaded functions:

subsasgn.m:

  this = builtin('subsasgn', this, selector, value);

subsref.m:

 r = builtin('subsref', this, selector);

But that’s it. How does this class know what are valid properties and what aren’t when they aren’t mentioned in any other file. What am I supposed to look for to change this?

Edit: well this is embarrassing… I restarted Matlab and now everything works fine. I thought that by typing the command clear classes, or clear all would have done the trick but I guess it needed a full reboot.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T05:21:17+00:00Added an answer on June 10, 2026 at 5:21 am

    The point is, you must now execute the command “clear classes”, since there are existing class members with the old format. MATLAB told you that fact itself. The properties are defined in the crazy_class.m file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've stepped into a new position and am tasked with cleaning up pre-existing code.
I'm using EF Code First with a pre-existing database. Two objects: public Foo {
I've created a bare git repository (Core), cloned from a pre-existing repo (Production) using
Currently I format code examples in my javadoc using the PRE tag e.g.: /**
I am mapping some pre-existing Business Objects to our database using Entity Framework. These
In the pre-existing code, the HTML file background colour has been set like this:
I have begun using Eclipse code templates and am loving 'em! But for existing
I'm working on a project where the pre-existing code has lots of manually setup
this is the piece of code that I am using in a loop to
I am using Eclipse platform for Java development. There are pre-existing jar files which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.