Field assignment to a non-structure array object.

4 ビュー (過去 30 日間)
Jun Wang
Jun Wang 2016 年 6 月 15 日
コメント済み: Christoph Haderer 2017 年 4 月 29 日
When I run the script shown below, I got this error: Field assignment to a non-structure array object. Does somebody know about this? I appreciate your answer very much.
  1 件のコメント
Christoph Haderer
Christoph Haderer 2017 年 4 月 29 日
In my case it helped to simply clear the workspace

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

採用された回答

James Tursa
James Tursa 2016 年 6 月 15 日
編集済み: James Tursa 2016 年 6 月 15 日
When the line "p.MarkerSize = bins" is reached, p is a pre-existing variable that is not a struct. So attempting to treat it as a struct by assigning something to a field named MarkerSize generates an error. You could clear p first before running this script.
  1 件のコメント
Steven Lord
Steven Lord 2016 年 6 月 16 日
Or just eliminate that line entirely, since the plot call on the next line will create a plot with markers of the desired size. That would require a slight modification to the plot call, to replace "p.MarkerSize" with "bins".

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

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by