I am not getting the plot graph for this equation.

2 ビュー (過去 30 日間)
maharaj
maharaj 2013 年 4 月 2 日
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.

採用された回答

Brian B
Brian B 2013 年 4 月 2 日
編集済み: Brian B 2013 年 4 月 2 日
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.)
  1 件のコメント
maharaj
maharaj 2013 年 4 月 2 日
Thank You sir.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by