Smoothing two Histogram on the same figure for an article
Mostrar comentarios más antiguos
Hi friends,
I'm starting using matlab for my thesis.
I have two vectors [x] and [y].
I want them to be displayed as the attached image.
thanks :)
2 comentarios
Roger J
el 20 de Jul. de 2020
At the command prompt type F1, then click "Open Help Browser" link.
In the help browser on the top right, type "plot" into the Search Documentation box.
"plot - 2-D line plot" is what you are looking for.
Select that, and scroll down to "Plot Multiple Lines" section.
t = linspace(-.5,.5, numel(x)) % this will be the horizontal axis in your picture
figure
plot(t,x,t,y) % this will plot x and y vs. t, and assumes x&y have the same number of elements
You will also find on that page, how to add labels to the axis, and how to add a legend.
noa goldman
el 20 de Jul. de 2020
Respuestas (0)
Categorías
Más información sobre Histograms en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!