How to multiply array by -1?

2 vues (au cours des 30 derniers jours)
Sean Roh
Sean Roh le 2 Mar 2021
I want to invert all the values in the array by -1.
[x,fs] = audioread('400hz.mp3'];
y=-1*x;
soundsc(y,fs);

Réponses (1)

Sai Veeramachaneni
Sai Veeramachaneni le 5 Mar 2021
Hi,
You can use y = -x or y = -1.*x

Catégories

En savoir plus sur Measurements and Spatial Audio dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by