

Example #4įor this example, we will plot a sine wave and a cos wave in the same graph as in the above example but will give the title and sub-title in ‘Blue’ color.
FGRAB IN MATLAB HOW TO
Next, we will learn how to format the title of the plot. Title('Trigonometric waves', 'Sine & Cos wave')Īs we can see in the Output, we have obtained a plot of a sine and cos wave with the required title and a sub-title. Use the ‘title’ command with 2 text arguments to give a title and a sub-title to this plot.Use the ‘plot’ command the plot the sine and cos waves.Example #3įor this example, we will plot a sine wave and a cos wave in the same graph and will give it the title “Trigonometric Wave” and sub-title “Sine & Cos wave”. This is how our input and output will look like in MATLAB command window:Īs we can see in the OUTPUT, we have obtained a plot of a cos wave with the required title and a sub-title. Use the ‘title’ command with 2 text arguments to give a title and a subtitle to this plot.Use the ‘plot’ command the plot the cos wave.Example # 2įor this example, we will plot a cos wave in MATLAB and will give it the title “Trigonometric Wave” and sub-title “Cos Wave”. Next, we will learn how to give a title and a sub-title to the plot. This is how our input and output will look like in Matlab command window:Īs we can see in the Output, we have obtained a plot of a sine wave with the required title.


You can do this kind of stuff in Matlab® with the ‘roots()’ command very easily. Sometimes you can have a very long and complex polynomial to calculate its roots by hand. Also, the calculation of roots of a polynomial can be very tough in calculus. Polynomial calculations are very easy in Matlab®.
