Graphics Reference
In-Depth Information
You can express the previous result with more elegant mathematical notation:
>> syms x; pretty(simplify(int(x^2*sin(x)^2, x)))
2 3
sin(2 x) x cos(2 x) x sin(2 x) x
-------- - ---------- - ----------- + --
8 4 4 6
3.
We can solve the equation 3ax - 7 x ^ 2 + x ^ 3 = 0 (where a, is a parameter):
>> solve('3*a*x-7*x^2 + x^3 = 0', 'x')
ans =
[ 0]
[7/2 + 1/2 *(49-12*a) ^(1/2)]
[7/2 - 1/2 *(49-12*a) ^(1/2)]
4.
We can find the five solutions of the equation x ^ 5 + 2 x + 1 = 0:
ans =
-0.48638903593454300001655725369801
0.94506808682313338631496614476119 + 0.85451751443904587692179191887616*i
0.94506808682313338631496614476119 - 0.85451751443904587692179191887616*i
- 0.70187356885586188630668751791218 - 0.87969719792982402287026727381769*i
- 0.70187356885586188630668751791218 + 0.87969719792982402287026727381769*i
As mentioned before, MATLAB can be extended by utilizing other libraries to extend its functionality. In particular,
MATLAB may use the libraries of the Maple V program, to work with symbolic math and can thus extend its field of
action. In this way, you can use MATLAB to work on issues such as differential forms, Euclidean geometry, projective
geometry, statistics, etc.
At the same time, you also can expand the topics of numerical calculation, using the libraries from MATLAB and
libraries of Maple (combinatorics, optimization, theory of numbers, etc.)
1.6 Graphics with MATLAB
MATLAB produces graphs of two and three dimensions, as well as outlines and graphics of density. You can represent
the graphics and list the data. MATLAB allows you to control colors, shading and other graphics features, also
supports animated graphics. Graphics produced by MATLAB are portable to other programs.
Here are some examples of MATLAB graphics:
1.
You can represent the function xSine (x) for x ranging between -p/4 and p/4 taking 300
equidistant points for the intervals. See Figure 1-20 .
>> x = linspace(-pi/4,pi/4,300);
>> y = x.*sin(1./x);
>> plot(x,y) 0
 
Search WWH ::




Custom Search