First and foremost let us explain the Function ezplot(). This function will plot an equation from -2pi to 2pi which gives a smooth curved line and will the title an expression of ezplot. If you wanted to change the x range of the graph, the second input to the function will represent that. ex :
ezplot(y,[range])
using the title/xlable/ylable functions is the same as using normal graphing. A variable representation of an equation is not necessary the equation can be the first input if desired how ever it must be written in the the constraints of apostrophes . Default from trigonometric function with the syntax of t has a different specific axis range. Must use hold on command to have multiple lines on the same graph instead of graphing different equations in the same line of code as an error occurs.
this is a table that represents the functions that you can use for ezplot:
|
Symbolic Plotting
Functions
|
||
|
ezplot
|
Function plotter
|
If z is a function of x : ezplot(z)
|
|
ezmesh
|
Mesh plotter
|
If z
is
a function of x and y
:
ezmesh(z)
|
|
ezmeschc
|
Combined mesh and
contour plotter
|
If z
is
a function of x and y
:
ezmeshc(z)
|
|
ezsurf
|
Surface plotter
|
If z
is
a function of x and y
:
ezsurf(z)
|
|
ezsurfc
|
Combined Surface and
contour plotter
|
If z
is
a function of x and y
:
ezsurfc(z)
|
|
ezcontour
|
Contour plotter
|
f z
is
a function of x and y
:
ezcontour(z)
|
|
ezcontourf
|
Filled contour plotter
|
If z
is
a function of x and y
:
ezcontourf(z)
|
|
ezplot3
|
Three-dimensional parametric
curve
plotter
|
If x
is
a function of t , if y
is
a function of t , and
if
z
is
a function of t : ezplot3(x,y,z)
|
|
ezpolar
|
Polar coordinate plotter
|
If r
is
a function of u : ezpolar(r)
|
Making these graphs are much easier than trying to make the same plots using the plot functions.These functions can also handle parametered functions as well
Using this mathematical model we solve and graph the same ballistics problem with the ezplot function. to solve the maximum angle that would get the largest range, the derivative with respect to theta would be calculated and then solved for the equation equal to zero. Afterward That theta value would be plugged back in to the initial equation using the sub function to find out what the max range is.
In this particular moment I feel inadequate in my attempt to understand the material being discussed as I can only contemplate theoretical answers and had some trouble shooting incursion occurred I am not entirely convinced that I'd be able to reach some sort of end that would meet the requirements to the parameters of the particular coding I intend on doing. There is also the vast emptiness that is felt while others are doing examples and I am just merely commenting on the lesson as we progress.
From here we move to calculus equations and thought patterns. the function for derivative would be diff() which stands for differentials that has the same meaning as derivatives. You can do the degrees of differentials by placing the input without apostrophes to have a differential with respect to a certain variable it is the second input in apostrophes .
As far as the integration concept is applied to matlab, the function int is used and much the same way that diff is used you can nest integrals or integrate with respect to a certain variable. Matlab also allows for definite integrals. for this specific code you set a variable equal to the integration and use the difference sub functions from the integration values. Don't forget to reformat answers to doubles to use them for future use in regular functions. definite integration can also be set to variable points that are arrays. the matlabFunction() converts functions to anonymous functions which act like normal matlab functions.









