Creating a Random Vector with Several Conditions
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (1)
darova
el 27 de Dic. de 2019
1 voto
Categorías
Más información sobre Linear Algebra en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
