Plot Polynomial graphing problem

I don't know how to plot this equation on matlab.
A = 5.00e-30;
B = 8.00e-121;
r = 0.1:0.1:4;
V = (-A./r)+(B./r.^10);
plot(r,V)
I don't get any error. I don't know why i get a wrong graph.

댓글 수: 1

Star Strider
Star Strider 2014년 9월 14일
What is it supposed to look like?
What function do you want to plot?

댓글을 달려면 로그인하십시오.

답변 (3개)

Morteza
Morteza 2014년 9월 14일

0 개 추천

Idk y i get a strange graph...
Image Analyst
Image Analyst 2014년 9월 14일

0 개 추천

You're plotting an equation that is nothing at all like the equation for the desired graph given in http://en.wikipedia.org/wiki/Lennard-Jones_potential so why do you think you should get the same curve shape?
Star Strider
Star Strider 2014년 9월 14일

0 개 추천

Your expression for ‘V’ does not closely match the Lennard-Jones potential AB-form. That suggests you should have an exponent for ‘r’ that is greater than 1 in your ‘A’ term, and that you should not negate the ‘A’ term.
Since I do not know what you are doing, I will leave that to you to sort out.

카테고리

도움말 센터File Exchange에서 Polynomials에 대해 자세히 알아보기

질문:

2014년 9월 14일

답변:

2014년 9월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by