Reputation: 817
I have an array of structures in MATLAB and I want to plot all of the values for one key. I know you can print it by doing array.key
but for some reason hist(array.key)
doesn't work.
Seems simple enough but I couldn't find how to do this.
Upvotes: 1
Views: 117
Reputation: 269
clear all
array(10).key = 1:10;
mat = [array.key]
hist(mat)
Try something like the above.
Upvotes: 2