フィルターのクリア

Cannot set camera position because of negative integers

1 回表示 (過去 30 日間)
link
link 2021 年 1 月 30 日
コメント済み: link 2021 年 1 月 31 日
So I want to set the camera position depending on a 3d point in the figure. If I print the current camera position to the console, I get the following output
campos =
279.5283
-101.4030
-740.6563
If I want to set the camera position
cpos =
347.2583
-96.3936
-711.3793
campos(cpos');
I get the error 'Array indices must be positive integers or logical values.'
I don't understand what I am doing wrong, because the campos cleary also has negative values.

採用された回答

Walter Roberson
Walter Roberson 2021 年 1 月 30 日
campos =
279.5283
-101.4030
-740.6563
That tells us that you assigned something to a variable named campos
campos(cpos');
and now you are trying to use campos as a function. But it is not a function, it is a variable because you assigned to it.
  3 件のコメント
Walter Roberson
Walter Roberson 2021 年 1 月 31 日
Notice your output had "compos =" at the beginning of it. If you had been calling the campos() function, then the result would have started "ans =" . MATLAB only displays "NAME =" when there is a variable with the given name that is being displayed.
link
link 2021 年 1 月 31 日
That is good to know :D I did not realize this

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Support Package for IP Cameras についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by