How to multiply array by -1?

3 次查看(过去 30 天)
Sean Roh
Sean Roh 2021-3-2
I want to invert all the values in the array by -1.
[x,fs] = audioread('400hz.mp3'];
y=-1*x;
soundsc(y,fs);

回答(1 个)

Sai Veeramachaneni
Hi,
You can use y = -x or y = -1.*x

类别

Help CenterFile Exchange 中查找有关 Audio I/O and Waveform Generation 的更多信息

标签

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by