how to insert an audio file in matlab 2014-a student version?

clc;
clear all;
close all;
message = audioread(Macintosh Users , kaushik , Music , ringtonesMetroGnome m4r);
message = message.';
message = message(1,:);
message = resample(message,12000,22868);
size = length(message);
pure_signal = message;
snr = input('enter the SNR value for noise :');
noise = wgn(1,size,snr);
noise_signal = pure_signal + noise;
step_size = input('Enter step size :');
order = input('Enter Order of the filter :');
[weights,final_signal] = lms(noise,noise_signal,step_size,order);
sound(final_signal);

Answers (1)

nalajala - what is the problem or error that you are observing? Your line of code that reads the audio data is incorrect
message = audioread(Macintosh Users , kaushik , Music , ringtonesMetroGnome m4r);
You need to pass a string into this function. Try the following instead
message = audioread('~/Music/ringtonesMetroGnome.m4r');
Does the above work or are you still observing an error?

Asked:

on 6 Mar 2015

Answered:

on 7 Mar 2015

Community Treasure Hunt

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

Start Hunting!