Struct contents reference from a non-struct array object.

10 ビュー (過去 30 日間)
Lindsey Marinello
Lindsey Marinello 2017 年 3 月 23 日
コメント済み: Lindsey Marinello 2017 年 3 月 23 日
Struct DATA_VICON is a 1x1 Struct with 5 fields that are 3x8685 doubles
The following code returns the error:
x = DATA_VICON.rate(3,:); plot(x)
(rate is one of the arrays in the struct)
But when I try the code in the command line it actually works! If you have any idea what I need to do differently please let me know.

回答 (1 件)

James Tursa
James Tursa 2017 年 3 月 23 日
Issue the following command:
dbstop if error
Then run your code. When you encounter the error, the code will pause. Examine your variables to see what they actually are. Then you can work on figuring out why they are not what you expected.
  1 件のコメント
Lindsey Marinello
Lindsey Marinello 2017 年 3 月 23 日
I gave it a shot and the only variable in the debug mode workspace is a 1x43 char version of VICON_DATA. I have no idea why that is happening but I would not have known otherwise. Thanks!

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

カテゴリ

Help Center および File ExchangeStructures についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by