How to take the absolute value for 2D spectrum?
4 views (last 30 days)
Show older comments
Ilya Grishanovich
on 21 Apr 2022
Commented: Ilya Grishanovich
on 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)
0 Comments
Accepted Answer
Hiro Yoshino
on 21 Apr 2022
try function "abs":
t=-pi:0.01:pi
y= sin(t);
plot(t,y);
y2 = abs(y);
plot(t,y2);
?
More Answers (1)
See Also
Categories
Find more on Fourier Analysis and Filtering in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!