필터 지우기
필터 지우기

subplot of trigonometric function

조회 수: 13 (최근 30일)
Yung Xi
Yung Xi 2019년 10월 24일
댓글: Steven Lord 2019년 10월 24일
Hi,
I want to make a 3x1 subplot (1 column and 3 row) for 3 trigonometric graphs
y = sin(x)
y= cos(x)
y = tan(x)
for x = 1:0.1:50
What code to do this? Thank you.

답변 (1개)

Stephan
Stephan 2019년 10월 24일
A = @(x) sin(x);
subplot(3,1,1)
fplot(A,[1 50])
B = @(x) cos(x);
subplot(3,1,2)
fplot(B,[1 50])
C = @(x) tan(x);
subplot(3,1,3)
fplot(C,[1 50])
  댓글 수: 2
Yung Xi
Yung Xi 2019년 10월 24일
Thank you. What code I use to change title for each graph, axis label, and line color?
Steven Lord
Steven Lord 2019년 10월 24일
The Formatting and Annotation chapter in the documentation describes functions, tools, and techniques you can use to customize the appearance of your plots.

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

카테고리

Help CenterFile Exchange에서 Subplots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by