Borrar filtros
Borrar filtros

I am not getting the plot graph for this equation.

3 visualizaciones (últimos 30 días)
maharaj
maharaj el 2 de Abr. de 2013
s=A+((B*exp(-1.001*((x.^2) + 100)))/((x.^2) +100)) This is the equation I am working on I have x ranging from -20 to 20 in steps of 2 and I think the problem is with the constants being very small. A= 10^-10 B=10^-3
Graph is not being generated. Would someone help in generating the graph for this.

Respuesta aceptada

Brian B
Brian B el 2 de Abr. de 2013
Editada: Brian B el 2 de Abr. de 2013
Presumably you want array division instead of a LS solution. Try
s=A+((B*exp(-1.001*((x.^2) + 100)))./((x.^2) +100))
% Note the dot right here ^
That gives you a vector instead of a scalar. Plots of scalars tend to be rather boring. (The plot function does draw a single point, but it's often easy to miss.)

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by