필터 지우기
필터 지우기

Loop correction of program. Zeeman Energy

조회 수: 1 (최근 30일)
Offroad Jeep
Offroad Jeep 2015년 9월 12일
답변: Walter Roberson 2015년 9월 13일
Attach please find the code for correction. All the details of errors are defined in the code for easy understanding. Graph result should be like black line in the attached jpg figure. Your help will be highly appreciated........
Regards
  댓글 수: 1
Walter Roberson
Walter Roberson 2015년 9월 13일
Note for readers: the code attached does not produce any error messages, but does not produced the desired value.

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

답변 (1개)

Walter Roberson
Walter Roberson 2015년 9월 13일
Your initial_magnetization can be shown to be 2.2 * mu_b * nrowscols^2 . As mu_b starts as 9.2700e-24 and nrowscol is small (3), the initial magnetization is only 1.8355e-22. To calculate the new_energy, that value is multiplied by mag_field_reverse which is maximum 2, and by cosd() of something real-valued which is between -2.5 and +2.5 degrees. The cosd is therefore between 0.9990 and 1. And the negative is taken of all of this. Your new_energy is therefore between -3.6709e-22 and -3.6672e-22. The black line in your sample plot implies you expect values approaching 1.
But what is being plotted? It is Magnetization. Which is calculated as initial_magnetization * cosd() of the angle at which new_energy was minimum or which was accepted probabilistically. So each Magnetization is going to be initial_magnetization (1.8355e-22) times something that is between 0.9990 and 1.0 . You are not going to see much on a plot, even if you multiply by 1E22.

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by