Analog read is not giving the correct waveform as that of an oscilloscope

I have this code that fetches analog input values from terminals A0, A1 and A2 of Arduino mega 2560. But, when I plot the data, it does not give the desired waveform. The desired waveform is parallel measured in the digital storage oscilloscope. I was thinking to make use of Arduino mega 2560 as an oscilloscope that can have 16 channels. Because the DSO has only 4 and for a project, I urgently need 16 channels. Would be great if the community people suggest something. Thanks.
[![Data read by Arduino-MATLAB interface][1]][1]

Below is the desired data from the oscilloscope that is measured parallel to avoid any confusion about the circuit.
[![Desired data measured parallel by an oscillopse][2]][2]

Code `

%This is a script that will plot Arduino analogRead values in real time
%Modified from
%The code from that site takes data from Serial 

clear all
close all

%User Defined Properties 
a = arduino('Com5')             % define the Arduino Communication port
s1 = serial('COM5');                                                       % Define here YOUR serial port

plotTitle = 'Arduino Data Log';  % plot title
xLabel = 'Time (s)';     % x-axis label
yLabel = 'Voltage (V)';      % y-axis label
legend1 = 'Voltage 1'
legend2 = 'Voltage 2'
legend3 = 'Voltage 3'
yMax  = 5                           %y Maximum Value
yMin  = 0                       %y minimum Value
plotGrid = 'on';                 % 'off' to turn off grid
min = 0;                         % set y-min
max = 5;                        % set y-max
delay = .01;                     % make sure sample faster than resolution 

%Define Function Variables
time = 0;
data = 0;
data1 = 0;
data2 = 0;
count = 0;

%Set up Plot
plotGraph = plot(time,data,'-r' )  % every AnalogRead needs to be on its own Plotgraph
hold on                            %hold on makes sure all of the channels are plotted
plotGraph1 = plot(time,data1,'-b')
plotGraph2 = plot(time, data2,'-g' )
axis([yMin yMax min max]);


while ishandle(plotGraph) %Loop when Plot is Active will run until plot is closed

%          dat = readVoltage(a,'A0')* 0.48875855327; %Data from the arduino
%          dat1 = readVoltage(a,'A1')* 0.48875855327; 
%          dat2 = readVoltage(a,'A2')* 0.48875855327;       

         dat = readVoltage(a,'A0')* 1; %Data from the arduino
         dat1 = readVoltage(a,'A1')* 1; 
         dat2 = readVoltage(a,'A2')*1; 
         count = count + 1;    
         time(count) = toc;    

         data(count) = dat(1);         
         data1(count) = dat1(1)
         data2(count) = dat2(1)

         %This is the magic code 
         %Using plot will slow down the sampling time.. At times to over 20
         %seconds per sample!

          axis([0 time(count) min max]);

          %Update the graph


disp('Plot Closed and arduino object has been deleted');`[code][code][i][b][code]


Most Arduinos have only one ADC, so it is not possible to read multiple channels in parallel.

You can buy 16 channel DSOs and 16 channel parallel ADC samplers.