sum first matrix and second matrix
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
abdullah qasim
am 12 Jan. 2019
Kommentiert: Walter Roberson
am 17 Feb. 2019
I want to collect the first function and the second function but there is an error there is no help ('Xf ').
x=[-1 8 2 -3 -5 6 -4 5 -8 7 -9 4 5 -10 -6 -11 8 3 7 1 -5 -20 14 18 19 -16 8 16 -17 -15];
Xp=x(x>0);
Xn=x(x<0);
figure(1)
stem(Xn);
title('negative signal');
Xn=abs(Xn);
figure(2)
stem(x);
title('orginal signal');
figure(3)
stem(Xp);
title('positive signal');
figure(4)
stem(Xn);
title('abs negative signal');
Xf=Xp+Xn;
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 12 Jan. 2019
Your Xp and Xn are different lengths. You cannot add them. And if you could, what would the answer mean ?
4 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Array and Matrix Mathematics 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!