How to write this formula in code and plot in matlab?
古いコメントを表示
Hi,
I want to calculate B field for receive only coils with the help of this formula.
B1=1/2(Bx−jBy)
I will be needed to plot the graph too. So, how to express it in code for Matlab to run. Thanks in advance. I am really new so I know this question will be like silly one.
Anyway. THanks in advance.
2 件のコメント
Glo
2015 年 1 月 2 日
1. decompose your original formula into real and imaginary parts, i.e. a + jb 2. Whatever values you want to plot for Bx and By, save them in a vector array e.g. B_x and B_y 3. Multiple each element of vector B_x and B_y with a and b respectively and save them in another array 4. plot them on x-y axis
Glo
2015 年 1 月 5 日
Ok, I would like to clarify what I meant. You have 2 arrays Bx and By (your source data). As according to the formula coefficients of 'j', will be the By array. The quantity B1, which you are trying to plot is a complex number, which cannot be represented on a single line, hence, a 2-D plane is required to plot 1 point value of B1. (Bx values on x-axis and By values on y-axis). That is why it is important to separate real and Imaginary parts, and scale them accordingly. (in your case divide by 2). That is why I told you to use another array in which Bx and By are scaled, and you just need to use plot().
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で White についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!