Unexpected MatLab expression when reading audio file

I'm trying to perform some analysis on audio files, but whenever I try to use audioread to read the files I get this.
[y, Fs] = audioread(/Users/kcrawfor/Documents/Rasmussen-Audio/audioCx05a.mp3);
[y, Fs] = audioread(/Users/kcrawfor/Documents/Rasmussen-Audio/audioCx05a.mp3);
Error: | Unexpected MATLAB operator.
I understand this is a syntax error but I'm new to MatLab and it could take hours of tutorials before I figure out whats wrong. Can anyone help me out?

 採用された回答

Walter Roberson
Walter Roberson 2016 年 6 月 7 日

0 投票

[y, Fs] = audioread('/Users/kcrawfor/Documents/Rasmussen-Audio/audioCx05a.mp3');
Filenames have to be strings.

1 件のコメント

Thomas Rasmussen
Thomas Rasmussen 2016 年 6 月 7 日
Thanks! that was a silly mistake thanks for catching it though

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeAudio I/O and Waveform Generation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by