Summation of graphs to one graph

조회 수: 1 (최근 30일)
Bader Al isa
Bader Al isa 2022년 6월 14일
답변: Leepakshi 2025년 2월 28일
I have multiple graphs and i wand to sum all these graphs together to have a simple one. (adding them like 1+1=2)
  댓글 수: 3
Nitanshu
Nitanshu 2022년 6월 14일
편집: Nitanshu 2022년 6월 14일
Hi Bader,
If your query is regarding plotting multiple graphs on same axes then you could refer to this answer.
Thanks.
dpb
dpb 2022년 6월 14일
Consider area -- can set colors to background color to get the lines only displayed.

댓글을 달려면 로그인하십시오.

답변 (1개)

Leepakshi
Leepakshi 2025년 2월 28일
Hi Bader,
As correctly said in comments, for plotting multiple normal distributions overlaying each other probably you can use the hold on keyword present in MATLAB.
you can use it as.
x1 = [1 2 3 4 5];
y1 = [2 4 6 7 10];
x2 = [5 4 3 2 1];
y2 = [2 3 5 8 10];
plot(x1, y1);
hold on
plot(x2, y2);
For more information you can refer below documentation on hold on:
Hope that helped!

카테고리

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