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!