Graphics in matlab
There are many different ways to manipulate graphics, for such the commands may include i.e., type help graphics for general graphics, while help graph2d is used for two dimensional command and for specialized and three dimensions the commands are help graphg3d, help specgraph.
Their two types of plotting in two dimensional graphs one is parametric and another one is contour or implicit plotting.
In a parametric plot, you give both the x and y coordinates of each point as a function of a third parameter, let us consider the parametric example.
r= linspace(0,4*pi,1000)
x=1.5*cos(t)-cos(10*r);
y=1.5*sin®-sin(10*t);
plot(x,y);
x label(‘x’);
y label(‘y’);
title(‘better parametric plot example’)
A contour of a function of two variables may be a curve along which the function features a constant value. Contour lines are used for creating contour maps by joining points of equal elevation above a given level, like mean water level.
A command meshgrid is used to provide grids for the rectangular regions. While the grid used by contour to produce the contour plot for the given region.
a= linspace(-2*pi,2*pi);
b = linspace(0,3*pi);
[a,b] = meshgrid(a,b);
C= cos(a)+sin(b);
contour(a,b,C)
In three dimensional plots they have three vectors in the same graph (x, y,z) mainly there are five different type of three dimensional plot in matlab. They are;
The mesh plotting function is employed to display the mesh plot. Which produces an wireframe surface where the lines connecting the defining points are colored.
[x,y] = meshgrid(-12:0.1:12);
t = sqrt(x.^2+y.^2);
z =(10*sin(t));
mesh(x,y,z)
Which is similar to mesh plot main different between them is in surface path the convecting lines and faces will be displayed in dark color. Let us consider the example.
[x,y] = peaks(30);
z = exp(-0.7*(x.^2+0.5*(x-y).^2));
surf(x,y,z);
xlabel(‘\bf X axis’);
ylabel(‘\bf Y axis’);
zlabel(‘\bf Z axis’);
title(‘\bf Surface Plot’)
colorbar
Introduction: When your Hisense TV won't connect to WiFi, it is rarely a problem with…
Hisense Google TV Storage Space Running Out: Why it Happens and How to Fix It…
Introduction: "Setting up a soundbar with your Samsung TV should be simple, but the HDMI…
User Problem Scenario: The Red Light "Panic" You press the power button on your Samsung…
Introduction: I Know the Feeling "We’ve all been there. You sit down to watch your…
User Problem Scenario: The "Diagnosis Loop" Paradox Imagine you notice your apps are slow. You…