Need to check input between range and convert it if not
Afficher commentaires plus anciens
The following subsystem is an error function for a robot which moves in a 2D spaces. So the error is based on the euclidean distance and the orientation error, theta. What I need to do is to check whether theta input is between two values (-pi, pi) and convert it to be in the specified range. For example, 2pi would be a whole circle but since we work on -pi, pi, it would be the same as 0, 3pi would be pi, 3pi/2 would be -pi/2 and so on, This is the subsystem, i have not found any block that could do this so specifying the range in the theta properties as -pi pi is as far as i've gotten.

Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Simulink dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!