How do I make an input sequence named n with a step of 1, ranging from -10 to 10?
Once I do that, how then do I make a stem plot of a function of n.
Then how to label both the x and y axes and add titles?

 채택된 답변

Paulo Silva
Paulo Silva 2011년 2월 18일

2 개 추천

n=-10:10;
a=0*n;
a(n>=0)=1;
stem(a)
xlabel('this is the x label')
ylabel('this is the y label')
title('this is the title')

추가 답변 (1개)

RAMA ARAVINTH
RAMA ARAVINTH 2021년 6월 24일

1 개 추천

n=-10:10;
a=0*n;
a(n>=0)=1;
stem(a)
xlabel('this is the x label')
ylabel('this is the y label')
title('this is the title')

카테고리

도움말 센터File Exchange에서 Labels and Annotations에 대해 자세히 알아보기

태그

질문:

2011년 2월 18일

답변:

2021년 6월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by