How to modify a sphereModel

2 次查看(过去 30 天)
Alonso Figueroa
Alonso Figueroa 2019-9-24
Hello, I am trying to modify the radius of a set sphereModel object to 1. So far I have tried modifying the radius through the Parameters of the object and this field is read-only. Also, if I try to modify to access the Radius directly the error apears to be that this is a dependant variable. any ideas on how to solve this issue?
roi.Bead1 = VBody_disection(Bead_model.vertices)
model.Bead1 = pcfitsphere(pointCloud(roi.Bead1), maxDist);
model.Bead1.Parameters(4) = 1;
model.Bead1.Radius = 1;
Thank you
Alonso

回答(1 个)

Athul Prakash
Athul Prakash 2019-9-27
Hi Alonso,
There's usually a reason for attributes to be set as 'Read Only' for a specific class. If you actually changed those, it would probably lead to an inconsistency, since 'Radius' is a Dependent variable.
The attributes you mention can only be set by calling the constructor.
Hence, I would recommend creating a new sphereModel object: you may set the Radius to the modified value and use the values from 'model.Bead1' for all other attributes.
Hope it Helps!

类别

Help CenterFile Exchange 中查找有关 Graphics Object Programming 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by