Unrecognize position() function

조회 수: 4 (최근 30일)
Mariah Rallos
Mariah Rallos 2021년 10월 8일
답변: Steven Lord 2021년 10월 8일
I am using a MATLAB R2021b, and I am trying to simulate a UAV scenario. Additionally, UAV Toolbox is already installed. I tried to use this
plat = uavPlatform("UAV",scene,"ReferenceFrame","NED",
"InitialPosition",position(:,:,1),"InitialOrientation",eul2quat(orientation(:,:,1)));
But it says "Unrecognized function or variable 'position'."
Can someone tell me how to solve this, please?

답변 (1개)

Steven Lord
Steven Lord 2021년 10월 8일
Looking at the documentation page it appears you're trying to use the "Define UAV Platform and Mount Sensor" section of the example as a model for your code. The first line of that section loads data from a MAT-file. I believe the scene, position, and orientation variables are stored in that MAT-file.
You need to define the InitialPosition and InitialOrientation. See the description of those name-value pair arguments on that documentation page to see what requirements (data type, sizes, values, etc.) those argument values must satisfy.

제품


릴리스

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by