used regularly by many people for many complex and ground breaking applications. But, people don't use it for one simple thing, Plotting graphs when we have a set of discrete data points. Probably the major reason for this is that many people don't know how to plot this kind of graph. So, in this article we will try to show you how you can do this in Matlab.
Let's consider that the set of coordinates are as follows :
Steps:
1.Open Matlab on your Computer2.Open Matlab Editor Window or click Ctrl+N
3.Seeing your data points, write a Matlab program just like the one shown below.
clc clear all close all x = [1 2 3 4 5 6 7 8]; %All the x coordinates y = [-2 -4 -4 5 8 1 9 10]; %All the y coordinates plot(x,y) grid on %Switches 'on' the grid display4.The graph output will look something like this, just as we can expect.
Image Attribution: Matlab Logo: http://electrosome.com/wp-content/uploads/2012/12/Matlab_Logo.png Thanks for letting us use that.
-------------------------------------------------------------------------------------------------
Follow our blog posts @ Follow. So that you won't miss any interesting post and also to be the first to know the answers to many interesting questions.
Follow us on our Facebook page @ Fre Blogg
Head over to my You Tube channel for some interesting tutorials @ You TubeCheck the "Random Post Viewer" to your right and try your luck



0 comments:
Post a Comment
Please Enter your comment here......