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!