Field assignment to a non-structure array object.

4 次查看(过去 30 天)
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.

采纳的回答

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 CenterFile Exchange 中查找有关 2-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