Graphics Reference
In-Depth Information
eXerCISe 2-2
on the same axes represent the graphs of the functions
y = sin (x
2
)
and
y = log (sqrt (x)).
the text of each
equation is properly positioned within the graph.
we get the graph in Figure
2-5
considering the following matlaB entry:
>> x = linspace (0,2,30);
>> y = sin(x.^2);
>> plot(x,y)
>> text (1,0.8, ' y = sin(x^2)')
>> hold on
>> z = log(sqrt(x));
>> plot (x, z)
>> text (1, - 0.1, ' y = log (sqrt (x))')
>> xlabel('X Axis');
>> ylabel ('Y Axis');
>> title('Graphic sine and logarithmic');
Figure 2-5.