Matlab classdef help

Hello,
I could use some help. For some reason none of my class methods are able to set my class properties. In my following class, I get a warning in my cylrandom() method:
[code]Probable conflict between handle and value class usage (lines 1 ans 24).
The class CLASS_CYL has no superclasses, so must be calue class (line 1).
A property is set in object CYL, but the modified object is not used or returned, implying that this class is a handle class (line 24).[/code]

[code]classdef class_cyl
properties(GetAccess = 'public', SetAccess = 'public')
cylID
angle
angle_mean
angle_spread
dist
dist_mean
dist_spread
end
methods
function cyl = class_cyl(ID, angle_mean, angle_spread, dist_min, dist_max)
cyl.cylID = ID;
cyl.angle_mean = angle_mean;
cyl.angle_spread = angle_spread;
cyl.dist_mean = (dist_max + dist_min)/2;
cyl.dist_spread = (dist_max - dist_min)/2;
cyl.cylrandom();
end
function cylrandom(cyl)
%random angle
cyl.angle = cyl.angle_mean - (rand(1,1)- 0.5) * cyl.angle_spread;
%random radius
cyl.dist = cyl.dist_mean - (rand(1,1) - 0.5) * cyl.dist_spread;
end
end
end[/code]

Reading the [link=http://www.mathworks.com/help/techdoc/matlab_oop/brenyev-1.html]Matlab Help page[/link] on the super class only confused me. Can anybody give me some help, or point me in the right direction?

Thank you,
~Brett
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories