Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Matlab issue

  1. Sep 10, 2009 #1
    Hey all. I have a little problem in Matlab. I attached word file in this post where the problem is explained because I can't write those formulas here.

    It's not hard, just need to put few formulas together. I also wrote what i tried, but the result is not good. I calculated it manually and the result in Matlab isn't as expected.

    I'm calculating magnetic field H in x-y plane due to current loop and I need to see how the field is changing according to radius of loop. I also wrote in word file what is expected, the result from one book, and results I calculated manually are very similiar to those in that book.

    If anyone can take few minutes, take a look and try to help me I wold be grateful. :)

    Attached Files:

  2. jcsd
  3. Sep 10, 2009 #2
    Just one correction
    K=1/E is not correct, it should be K=(1/E)*(pi/2)^2
  4. Sep 10, 2009 #3
    The following code seems to work:

    clear all;clc;







    plot(r, H);
    grid on;


    You made a mistake with the parenthesis of the sqrt for the lowercase 'k'
    I corrected it and saw a functional dependence of something similar to what you have shown.

    The y-axis values may not be right, but they depend on your parameters anyway....

    Hope it helps...
  5. Sep 13, 2009 #4
    Yes, thank you very much...it's something like thaht, but I don't get why the values for H are so much bigger than expected...for example in 0 I'm sure that H needs to be 0,5 and on this graf it is 10 times bigger...the funcion looks allright, but this results are confusing...
  6. Sep 13, 2009 #5
    finally...it's ok...stupid mistake...now it is as it should be :)
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Matlab issue
  1. Issue of sematics (Replies: 3)

  2. Moment issue (Replies: 1)

  3. Coriolis issue (Replies: 1)

  4. Matlab issue (Replies: 6)

  5. Kinetics issues (Replies: 4)