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 805751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:07:52+00:00 2026-05-15T00:07:52+00:00

The Following is the basic skeleton for my MATLAB program. Each box is a

  • 0

The Following is the basic skeleton for my MATLAB program. Each box is a class definition.

Scroll down for the error.
alt text
Note: 1. Each Class has a custom constructor


The Error

Undefined function or variable 'Troom'.

Error in ==> wall>wall.wall at 31
        function o = wall(Tr)

Error in ==> mainfile at 5
        w1 = wall();

This comes when I create an object of Class wall from another file “mainfile”


Question

  1. Why is this happening?
  2. Am I getting wrong in the concepts of OOP for Matlab specific?
  3. How do I resolve this?

Thanks in Advance!


PS: Code

function o = wall()
        Tr = o.Troom*2;
        o.N = round(1/o.dx) + 1;
        o.T = Tr * ones(o.N,1);
        o.Tinf = Tr;
        o.update_properties();
    end

Code 2

classdef wall
properties
    dx = 0.01;
    dt = 0.4;
    L = 0.16;
    N;
    tlimit = 1505.2;
    sbc = 5.670400e-8 % The Stefan-Boltzmann Constant

    a;
    hi; % Surface Conductivity of Inner Surface
    bi;
    ho; % Surface Conductivity of Outer Surface
    bo;
    lamb;

    Troom = 298; % Room Temperature (K)
    Tinf;
    T;

    room = compartment();
    conc = concrete();
    fire = fireProperties(Troom);

end
  • 1 1 Answer
  • 2 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-05-15T00:07:52+00:00Added an answer on May 15, 2026 at 12:07 am
    room = compartment();
    conc = concrete();
    fire = fireProperties(Troom);
    

    Yeah, there’s your problem right there. Troom can’t be used in the context of the properties block. Either put the constant in for Troom or move these into the constructor where they belong.

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

Sidebar

Related Questions

If I have the following basic C++ program: #include <iostream> using namespace std; class
I have the following basic classes (cut down for this question): public class Parent
I have the following basic HTML: <div class=row-wrapper> <div class=box>...</div> <div class=box>...</div> </div> ...and
The following program is a basic linked list divided in 3 classes. In the
consider the following basic class layout: public class Base : IComparable<Base> { public int
I am following a basic hibernate tutorial. The tutorial program is running & showing
Consider the following basic class: public class ConstructorExample { public ConstructorExample(){ System.out.println(Constructor called.); }
I am designing a GUI that has the following basic idea (similarly modeled after
Considering the following basic event-related code inside a class: public event EventHandler Updated; public
I have the following basic entities: public class Basket { public List<Product> Products {get;set;}

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.