Plotting 2 functions as graphs in a singular window

조회 수: 7 (최근 30일)
Felix
Felix 2014년 3월 30일
댓글: Felix 2014년 3월 30일
I have to functions P and C, I need to plot them as graphs (already inputted an array of x values). I used the following to make plot the graphs: plot(p); plot(c); but i need both plots to appear in the same single figure window, a 2x1 array of plots. any help or hints will be welcomed with this part of of my assignment

채택된 답변

the cyclist
the cyclist 2014년 3월 30일
Use the subplot command:
figure
subplot(2,1,1), plot(1:10)
subplot(2,1,2), hist(rand(10,5))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Discrete Data Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by