Please do the whole questions and please please I need the n



Please do the whole questions and please please I need the name of the book that you find the questions in.

Given the vectors x=[1 2 3 10) andy\" [1 4 9 1001, plot them in MATLAB using: (a) plot (x, y); (b) plot (x, y,+ (c) plot (x, y, x, y, \'+; (d) plot (x, y.\'-, x (1:2: 10),y (1:2: 10),\'+ (e) semilogy (x, y); () loglog (x, y.+)

Solution

x=[1 2 3 4 5 6 7 8 9 10];
y=[1 4 9 16 25 36 49 64 81 100];
xlabel(\'x axis\');
ylabel(\'y axis\');
%plot(x,y);                              %(a)
%plot(x,y,\'+\');                          %(b)
plot(x,y,\'-\',x,y,\'+\');                  %(c)
%plot(x,y,\'-\',x(1:2:10),y(1:2:10),\'+\'); %(d)
%semilogy(x,y);                           %(e)
%loglog(x,y,\'+\')                          %(f)

This is the matlab code. You can run each only by removing \'%\' sign from code line and you will get all curves.

You can get sources by searching online(google). Or you can follow the book:

A Guide to Matlab: B. R. Hunt, R. L.Lipsman, J. M Rosenberg

 Please do the whole questions and please please I need the name of the book that you find the questions in. Given the vectors x=[1 2 3 10) andy\

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site