

So if i select 10 from here you can see that the size of the marker is increased. If you want to change the size of this marker again right click and go here into the marker size option here many options are available starting from 2 to 48. Now if you want to place markers on this particular graph again right click and go to the marker and there are many choices available in this menu and you can select any marker of your choice for example I am selecting this square marker. So it will change the color of this graph or you can change the color by your choice. Now click on Ok and the color of the wave will be change. Now click on the graph and now right-click on this graph to go to the color if you want to change the color of this graph you can do so by selecting the color of your choice.įor example, I am going to select the green color from here.
SUBPLOT MATLAB HOW TO
Let me maximize it now i will be showing you how to modify the style of this particular graph to do this first of all select the arrow to edit the plot.

The following command will plot the sine wave like this: So if I select the time vector of length twenty starting from 0 up to 19 and I plot this sine wave so you will see that I get a single time period of this sine wave. In our case since the sampling frequency is twenty times the frequency of the sine wave therefore if you set a length of this time vector equal to twenty then the command which automatically plot one time period of this sine wave. So the value of this time vector depends on how many time periods you want to plot this sine wave. So as an example I am going to plot a sine wave having frequency 50 Hertz and I select the sampling frequency of 1000 which is 20 times the frequency of the sine wave as you increase the sampling frequency you will get a clearer and crisp sine wave plot and then the next thing is the time vector. The value of sampling frequency must be at least two times the frequency “f” and by carefully selecting the value of “n” which is a vector of time you can plot desired number of time periods of the sine wave. It is sin (2*pi*(f/fs)*n) where f is the frequency, fs is the sampling frequency and n is the time index. So, first of all, let’s discuss the basic syntax of sine wave function in MATLAB. Now you will learn how to plot a simple sine wave having different frequencies, different sampling frequencies and different time periods.
SUBPLOT MATLAB SOFTWARE
Matlab plotting- MATLAB is the most widely used simulation software by engineers throughout the world and in this article will learn how to plot a simple sine wave which is function of time.
