Creating a Random Vector with Several Conditions
이전 댓글 표시
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.
채택된 답변
추가 답변 (1개)
darova
2019년 12월 27일
1 개 추천
카테고리
도움말 센터 및 File Exchange에서 Linear Algebra에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
