How to take the absolute value for 2D spectrum?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Ilya Grishanovich
am 21 Apr. 2022
Kommentiert: Ilya Grishanovich
am 21 Apr. 2022
I have 2D spectrum with positive(blue) and negative(red) signals, I want to make all signals positive and to save the received spectra.
How to make it? (thank you in advance)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/972100/image.png)
0 Kommentare
Akzeptierte Antwort
Hiro Yoshino
am 21 Apr. 2022
try function "abs":
t=-pi:0.01:pi
y= sin(t);
plot(t,y);
y2 = abs(y);
plot(t,y2);
?
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Fourier Analysis and Filtering finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!