Undefined variable "som" or function "som.wave". in [y, fs, nbits, opts]=wavread(som.wav) function

1 view (last 30 days)
Hi everyone! I'm trying to use this function [y, fs, nbits, opts]=wavread(som.wav)
but it keeps making that error. "Undefined variable "som" or function "som.wav"." But I don't get it... "som.wav" is a sound file (.wav naturally), and it is in my MATLAB folder with every other m-files on my computer.
Can anyone help me? I'm kind of new with matlab, an this is a homework assignment.
Thanks!

Accepted Answer

Wayne King
Wayne King on 5 Mar 2012
You should input it as a string variable.
[y, fs, nbits, opts]=wavread('som.wav')
And make sure the folder where som.wav is located is on the MATLAB path. You indicate that it is in your post, so just making sure it is a string should work.

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!