Field assignment to a non-structure array object.
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Jun Wang
il 15 Giu 2016
Commentato: Christoph Haderer
il 29 Apr 2017
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 Commento
Risposta accettata
James Tursa
il 15 Giu 2016
Modificato: James Tursa
il 15 Giu 2016
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 Commento
Steven Lord
il 16 Giu 2016
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".
Più risposte (0)
Vedere anche
Categorie
Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!