y = e^(-x^2)

143 views (last 30 days)
fahad
fahad on 15 Nov 2012
Commented: Walter Roberson on 14 Jun 2023
I want to plot the above equation in matlab but i dont know how to plot please help or provide me code

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 15 Nov 2012
x=0:0.1:10;
y=exp(-x.^2);
plot(x,y)
  3 Comments
Rik
Rik on 9 Oct 2021
Is this the exact code you're using? Because this isn't a valid Matlab syntax.
Steven Lord
Steven Lord on 9 Oct 2021
Take a look at fimplicit3.

Sign in to comment.

More Answers (1)

Manka'a Abongnwi
Manka'a Abongnwi on 9 Jun 2023

y = be ax sin(bx)(0.012x4 0.15x3 + 0.075x2 + 2.5x)

  3 Comments
Manka'a Abongnwi
Manka'a Abongnwi on 14 Jun 2023
Wow after using the formula given by sir, everything worked well except the place to plot a graph of y and z versus x that's difficult
Walter Roberson
Walter Roberson on 14 Jun 2023
plot3()... except that you do not show any z variable.

Sign in to comment.

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!