Im having trouble loading a program to explore the output using Plot Command

We were asked to upload a code and use plot command to explore the output, but the code I uploaded is receiving errors, please help
load handel
sound (y,Fs)
multiplier = 0.10 ;
noise = randn(length(y),1) * multiplier ;
%% Explore This
sound_w_noise = y + noise ;
sound (sound_w_noise,y) ;
t = 1:length(y) ;
plot(sound_w_noise,1:200,t)
Error using sound (line 76)
Operands to the || and && operators must be convertible to logical scalar values.
Error in PlotCommandExploration (line 17)
sound (sound_w_noise, y) ;
This is the code I was told to upload and the errors I'm receiving. I have no idea where to start

Answers (1)

load handel
sound (y,Fs)
multiplier=0.10 ;
noise=randn(length(y),1)*multiplier ;
%% Explore This
sound_w_noise=y+noise ;
sound(sound_w_noise) ;
t=1:length(y) ;
plot(sound_w_noise,t);
kk.png

1 Comment

Thank You!! I found my error. Now how would I examine the first 200 data points only in my plot?

Sign in to comment.

Asked:

on 25 Nov 2018

Commented:

on 25 Nov 2018

Community Treasure Hunt

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

Start Hunting!