How to store the signal in a variable and plot the signal in MATLAB I am trying to store the signal I have created in a single variable and graph the signal in two subplots in one single graph, one for left channel, one for right channel.

Fs = 44100;
N = 400
t = (1:N)*(1/Fs);
freq = 500;

sound_array = zeros(N,2);
%starts N x 2 matrix
sound_array(:,1) = sin(2*pi*freq*t);
sound_array(:,2) = sin(2*pi*freq*t);

%Left and Right channels
sound_L = sound_array;
sound_L(:,2) = 0;
sound_R = sound_array;
sound_R(:,1) = 0;  
plot(sound_array);

R = 400;
beep = [sound_array; zeros(R, 2)];

%Sound 1 
sound(sound_L, Fs);
pause(1);
%Sound 2
sound(sound_R, Fs);
%Play Consecutive
sound(sound_array, Fs);
I suggest you to do something like (one plot with two curves):

figure
plot(sound_L(:,1), 'b'); % blue
hold on; grid on; % prevent from redrawing and add grid\
plot(sound_R(:,2), 'r'); % red
legend({'left', 'right'});


Or if you want two subplots:

figure
subplot(211);
plot(sound_L(:,1), 'b'); grid on;
subplot(212);
plot(sound_R(:,2), 'r'); grid on;


Please mind that in your case sound_L and sound_R are the same. You are not making any use of beep variable.