105 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
0
answers
60
views
Variable 'Ptot_pdf' originally saved as a prob.NormalDistribution cannot be instantiated as an object and will be read in as a uint32
I want to run the STORM package in Matlab, but I receive this error:
STORM('Validation',1,30,2,'ptotC','stormsC','ptot2C','storms2C','ETC')
Warning: Variable 'Ptot_pdf' originally saved as a prob....
2
votes
1
answer
54
views
Call class method from within class: not enough input arguments
Let's define the following class with some nested methods:
classdef MyClass
methods(Static)
function a = simple_func(obj)
a = obj.simple_func2(1);
end
function ...
0
votes
0
answers
143
views
Several questions about overload the 'copyElement' method in subclasses of 'matlab.mixin.Copyable'
The matlab.mixin.Copyable page describes the following information:
The copy method makes a shallow copy of the object.
copyElement is a Protected Method that the copy method uses to perform the ...
1
vote
2
answers
64
views
Is there a good way here to allow users to both retain access control for properties and overload indexing methods?(matlab 2020a)
Assuming a member within a class has private access properties, i.e., GetAccess=private, if we use a "." type reference for that member in the overloaded subsref method, then the access ...
0
votes
1
answer
56
views
How to overload A{n} in a custom class? matlab 2020a
Background knowledge
subsref
Some explanations in the book (published in 2014):
When overloading the subsref method, you can use a switch statement to select the type of index and obtain the actual ...
0
votes
0
answers
38
views
(First time using MATLAB) Examples for constructors of htensor
Unfortunately, I have no experience with Matlab and now I need a few visualizations in this program.
At the moment i'm working on tensors and their approximation possibilities.
More specifically with ...
0
votes
1
answer
301
views
Defining a list of class instances in MATLAB
I am going to define a class in MATLAB called "Node" which is supposed to be a node of a tree structure.
I have a variable inside it called "NodeList" which is supposed to be a ...
1
vote
3
answers
1k
views
Define Multiple Enums in a Single File in Matlab
Is it possible to define multiple enumerations in a single Matlab file? Or is it possible to have "local" enums in the same way we can define local funtions at the end of a file?
I am ...
0
votes
1
answer
1k
views
How to access property from static method
As the title says I am setting a property with the constructor and would like to access the property later as a get function that is static. How would I do this in MATLAB?
classdef Wrapper
...
3
votes
2
answers
200
views
Representation of value class in table
If I have a value class like this:
classdef MyVal
properties
foo
end
methods
function self = MyVal(varargin)
if nargin > 0
self.foo = ...
1
vote
2
answers
145
views
How to make a member public in an class object created using MATLAB Class folder?
I'm trying to reuse a package in which all classes are written using Class folder i.e all methods are files inside a folder @myclassname. I would like to read the members of the class object. In ...
0
votes
0
answers
34
views
Abstract function working in command line, not working in class as constant property
Following function works at the command line, however not in the class as a constant property. I tried a lot of different combination with integral other function etc. but I was unable to solve it.
...
0
votes
0
answers
99
views
Weird error while using constant properties in class
I am trying to save functions as variables inside a class so I can reach them in an ordered manner. However, whenever I try to pull any constant from the following class, I get the following error.
...
1
vote
1
answer
250
views
Matlab can't change parameters of a class while in constructor
I am calling a function to change parameters of my class inside its constructor, however, I can't change the values. Is this a bug or on purpose?
In the following example, I am calling function "...
0
votes
2
answers
270
views
Why isn't this object destroyed when it is cleared from the workspace?
I am working on a MATLAB class which stores an interface object created with tcpip and includes a callback function for the interface object to use, as per the following example:
classdef wsg50_mini2 ...