Creating a Random Vector with Several Conditions
Afficher commentaires plus anciens
Hello everyone,
I have vector with known values. Z1=[x1,y1,z1]. I want to create a vector (Y1=[x2,y2,z2]) with several conditions. Conditions are;
0<y2<1, -1<z2<0, -1<x2<1
Also Z1 and Y1 must be perpendicular so that their dot product must be zero x1*x2+y1*y2+z1*z2=0 and Y1 should be a unit vector so that x2*x2+y2*y2+z2*z2=1.
I can not use the symbolic toolbox,fsolve or anonymous functions since the code won't be able to suitable to compile before run-time in simulink. I really appreciate any ideas.
Thanks.
Réponse acceptée
Plus de réponses (1)
darova
le 27 Déc 2019
1 vote
Catégories
En savoir plus sur Random Number Generation 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!
