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.

댓글 수: 1
채택된 답변
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
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개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!