How to get 2 discrete signals into 1 graph?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Basically i need to graph this signal but I graph it part by part:
x[n]=
{-3n*(n^n-5), 3<=n<6
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226938/image.png)
2, 0<=n<3
0, for every other n
>>n1=[0 1 2];
>> x1=[2 2 2];
>> stem(n1,x1)
>> hold
Current plot held
>> n2=[3 4 5];
>> x2=-3.*n2.*(n2.^n2-5);
>> stem(n2,x2)
But this does not work. Can i even do it part by part or is there more efficient way to draw this signal?
5 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Stem Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!