Welcome To Home of Information

Plot the following MATLAB functions y = ln(exp(x^-1)) with x = 1, 1.5, 2, ..., 4

Posted in
No comments
By Anonymous





Plot the following MATLAB functions



          y = ln(exp(x^-1)) with x = 1, 1.5, 2, ..., 4

Solution:

function Question11()
    noFigure = 1;
    figure(noFigure);
    X = 1 : .5 : 4;
    Y = log(exp(X .^ -1));              %as per given
    plot(X, Y);                                 %plotting graph
end


0 comments:

Plot the following MATLAB functions: y = exp(-x^2) with x = 0, 0.1, 0.2, ..., 2

Posted in
No comments
By Anonymous


Plot the following MATLAB functions:



              y = exp(-x^2) with x = 0, 0.1, 0.2, ..., 2

Solution:

function Question11B()
    noFigure = 1;
    figure(noFigure);
    X = 0 : .1 : 2;
    Y = exp(-X .^ 2);                     %as per given
    plot(X, Y);                     %plotting graph
end
  


0 comments:

About the Author

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque volutpat volutpat nibh nec posuere. Donec auctor arcut pretium consequat.

Proudly Powered by Blogger.