how can I combine 3 plane same figure

1 次查看(过去 30 天)
Hi guys,
I am trying to plane something on the same figure. I have 3 plane (plot function). How can I evaluate on the same figure in the chosen interval like 3 equation (-10,10),
x = linspace(-5,5,100);
HomoDom=(a/(sqrt(6.28)))*(exp(-(x.^2))/2);
v=plot(x,HomoDom);
x = linspace(-5,5,100);
Hetero=(b/(sqrt(6.28)))*(exp(-(x.^2))/2);
b=plot(x,Hetero);
x = linspace(-5,5,100);
HomoRes=(a/(sqrt(6.28)))*(exp(-(x.^2))/2);
n=plot(x,HomoRes);

采纳的回答

Adam Danz
Adam Danz 2020-3-18
See hold on.
  4 个评论
Adam Danz
Adam Danz 2020-3-18
You only need to run hold on once. It set's the axes' properties so that new objects won't replace old ones.
Why can't you add the 3rd plot? Is there an error? Is it not appearing? What's problem are you seeing?
My guess is that the 3rd plot is added without any problem but it's exactly the same as the first one since you're using the same input values.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by