How to modify a sphereModel

1 回表示 (過去 30 日間)
Alonso Figueroa
Alonso Figueroa 2019 年 9 月 24 日
回答済み: Athul Prakash 2019 年 9 月 27 日
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 Center および File ExchangeGraphics Object Programming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by