How to multiply array by -1?

조회 수: 1 (최근 30일)
Sean Roh
Sean Roh 2021년 3월 2일
답변: Sai Veeramachaneni 2021년 3월 5일
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
Sai Veeramachaneni 2021년 3월 5일
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