Error: No appropriate method, property, or field 'polyCirc' for class 'MobiusDraw'.

1 view (last 30 days)
classdef MobiusDraw
% ATTRIBUTES OF CLASS OF MOBIUS METHODS/SUBROUTINES TO DRAW FRACTALS
properties %(Access = private)
complexZ
matrixT
circObj
end
% METHODS OF CLASS
methods (Access = public)
% CONSTRUCTOR METHOD TO INITIALIZE VARIABLES/PROPERTIES. THE
% VARIABLES/PROPERTIES ARE A COMPLEX NUMBER, A MATRIX AND A CIRCLE OBJECT
function MOB = MobiusDraw(z, T, c)
MOB.complexZ = z;
MOB.matrixT = T;
MOB.circObj = c;
end
% DRAWS THE IMAGE POINT GIVEN THE MATRIX AND THE ORIGINAL POINT
function mop = imgPoint (MOB, T, z)
MOB.matrixT = T;
MOB.complexZ = z;
mop = (MOB.matrixT(1,1)*MOB.complexZ + MOB.matrixT(1,2))/(MOB.matrixT(2,1)*MOB.complexZ + MOB.matrixT(2,2));
end
% DRAWS THE IMAGE CIRCLE GIVEN THE MATRIX AND THE ORIGINAL CIRCLE
% OBJECT
function D = imgCircle (MOB, T, c)
MOB.matrixT = T;
MOB.circObj = c;
MOB.complexZ = MOB.circObj.cen - (MOB.circObj.rad*MOB.circObj.rad)/conj(T(2,2)/T(2,1) + MOB.circObj.cen);
D.cen = mobius_on_point(T ,MOB.complexZ);
D.rad = abs(D.cen + mobius_on_point(MOB.matrixT, MOB.circObj.cen + MOB.circObj.rad));
end
function polyCirc(MOB)
h = imgCircle (MOB.matrixT, MOB.circObj);
h.cen = cen;
h.rad = rad;
n = 1000;
theta = (0:n-1)*(2*pi/n);
xc = real(cen);
yc = imag(cen);
x = xc + rad*cos(theta);
y = yc + rad*sin(theta);
h = polyshape(x,y);
hold on
plot(h)
hold off
end
end
end
This is my code and everything works except the function
polyCirc
It displays the error in my title. The method actually needs the output D.cen and D.rad from the previous method
imgCircle
So it is actually supposed to be something like
polyCirc(D.cen, D.rad)
but i wasn't sure how to go about it. Any ideas? Should I use a static method? Thanks in advance

Answers (0)

Categories

Find more on Construct and Work with Object Arrays in Help Center and File Exchange

Products


Release

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!