Effacer les filtres
Effacer les filtres

How do I make a stem plot in MATLAB?

9 vues (au cours des 30 derniers jours)
WONG SIAN
WONG SIAN le 18 Fév 2011
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?

Réponse acceptée

Paulo Silva
Paulo Silva le 18 Fév 2011
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')

Plus de réponses (1)

RAMA ARAVINTH
RAMA ARAVINTH le 24 Juin 2021
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')

Catégories

En savoir plus sur View and Analyze Simulation Results dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by