% Define the signal values for both positive and negative time indices
n_negative = -5; % Number of negative time indices
n_positive = 5; % Number of positive time indices
central = .5; % Number of zero time indices
% Define the signal values for negative and positive time indices
x_negative = [0.2, 0.4, 0.6, 0.8, 1.0]; % Replace with your own values
x_positive = [1.0, 0.8, 0.6, 0.4, 0.2]; % Replace with your own values
centralvalue = [1.0, 0.8, 0.6, 0.4, 0.2]; % Replace with your own values
% Concatenate the signal values to create the full signal
n = [n_negative:n_positive]
x = [x_negative, central x_positive]
% Plot the noncausal discrete signal
stem(n, x, 'b', 'filled'); % 'b' for blue color, 'filled' for filled markers
xlabel('Time Index (n)');
ylabel('Signal Value (x[n])');
title('Noncausal Discrete Signal');
grid on;