Mathematics Students of HIGH-SCHOOL, even you can use MATLAB for your purpose.
Drawing graphs on MATLAB is as simple as it could be on papers. For the purpose allow need to define is a domain for which we are going to draw the graph on x-y plane.
Usually when we draw graphs on x-y plane, for most of the functions domain is all real numbers on x-axis and the kind of graph we obtain is continuous in nature but in MATLAB we used to define a bounded region of domain in which we draw the graph and within this bounded region we choose some samples at regular interval for which we get definite set of range. Joining all these values of 'y' (dependent variable) we obtain our graph of the function on x-y plane.
How to define 'Domain' for graphs in MATLAB:
Suppose we have to draw graph of a function y = x^2 for all x (Indepndent variabl) lying between -10 and +10, then domain will be defined as
x = -10:0.1:+10;
'0.1' is interval after which independent variables will be considered between -10 and +10 , for which we will get corresponding values of dependent variables.
Defining mathematical functions in MATLAB:
y = x.^2;
Plotting the graph of the this parabolic function:
plot(x,y)
In this way we obtain a graph of y = x.^2 on MATLAB.
No comments:
Post a Comment