Plotting a function by cut-and-pasting an example from the technical help web site.
Here's the code:
% Plotting a waveform with a line and stems example, A.W. Dec 2012
x=0:0.05:2; % make an x range from 0 to 2, with 1/20 steps
y=sqrt(x).*sin(2*pi*x); % make y be some function of x
figure % (optional) make a new plot window
plot(x,y,'g') % plot y against x with a green line
title('Modulated Sine Wave Plot');
hold on % keep the existing curve(s)
stem(x,y,'r') % plot stems in red
ylabel('Amplitude') % axis labels
xlabel('Time')
axis([0,2,-2,2]) % set axes range x=0 - 2, y=-2 - +2
hold off
Auf dieser Seite können Sie das Online-Video Matlab - plotting a function waveform, line and stem mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Alan Wood 28 März 2017 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 1,904 Mal angesehen und es wurde von 9 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!