Field assignment to a non-structure array object.

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일

2 개 추천

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

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개)

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

질문:

2016년 6월 15일

댓글:

2017년 4월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by