impoint issue: setPosition in a addNewPositionCallback function
1 次查看(过去 30 天)
显示 更早的评论
Hi
Is there a way to use setPoint in a addNewPositionCallback function. I want to reallocate a draggable point (setting dynamic restrictions) so that the impoint is restricted for example to a certain slope movement, or attached to a certain curve.
This is the general idea, where BaP is a global array of imPoints and B2Ba is an angle:
addNewPositionCallback(BaP(2),@Interact);
function Interact(Pos)
global BaP B2Ba
P=getPosition(BaP(1));
setPosition(BaP(2),[Pos(1,1) P(1,2)-Pos(1,1)*tan(B2Ba)]);
But it doesn't get repositioned as i wanted. Checking the impoint object, the property insideSetPoint is not letting me change the current position further using setPosition. Is there a workaround for this? Or any way of getting the desired behaviour?
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Environment Customization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!