I am not getting the plot graph for this equation.
조회 수: 2 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
채택된 답변
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.)
추가 답변 (0개)
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!