MATLAB Answers


How to plot a function like this in matlab

Asked by maharaj
on 23 Feb 2013

exp(-ax+bx^2) where x ranges from 5-250 in order of 1.

  1 Comment

Walter Roberson
on 23 Feb 2013

What are "a" and "b" ?



1 Answer

Answer by Walter Roberson
on 23 Feb 2013
 Accepted answer
x = 5 : 250;
y = exp(-a*x + b*x.^2);
plot(x, y)


Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!