How do I create more than one plot at a time in a script?
Show older comments
We are taking multiple measurements from multiple instrument channels. I would like to create a histogram of values by channel, then another histogram of all of the data combined. How do you create more than one plot in a script? I'm attaching my code, it creates a single plot of the combined data.
for angle = 90:10:270
rows = nonInvData.actAngle == angle & nonInvData.orientation == orientation;
dataVals = nonInvData(rows, ["channel","pa13"]);
for chn = 0:39
rows = dataVals.channel == string(chn);
data = dataVals(rows, "pa13");
h(angle) = histogram(data.pa13,20,'DisplayName',string(chn),"BinMethod","integers")
hold on
end
hold off
legend show
h(angle+1) = histogram(dataVals.pa13,20,'DisplayName',string(chn),"BinMethod","integers")
end
Accepted Answer
More Answers (0)
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!