I need help! How to plot B1 field with the help of this code?

Hi,
  • I have simulated RF coil and generated B1 field with the help of a commercial software and now I want to visualize the same with the help of a matlab. But, I am not able to do so.
  • The output of the commercial software is stored in bin file so I have attached it here.
  • I have attached the code in m file
  • I have attached the figure from the commercial software that I get of B1 field.
  • I have attached the figure that I am getting in Matlab by using and modifying this code.
  • I have attached the workspace window here which I believe shows the error. It shows vector img size is 1*362 double while all other input is 313*362 double. I am not sure but may be this is the problem which results in the output image.
Any help is appreciated. I am really stuck at this. Thanks in advance!

3 Comments

What about using the debugger to step through your code line by line and check, where the unexpected dimensions come from?
Thanks Jan Simon for taking your time to comment. I found out that taking rms resulted in that dimension. By removing rms, I get 313x362 double as expected. Still, I am not able to figure out why there is variation in the output image with respect to the image I get from commercial software. So, far I got this image after optimizing. Also, would it be possible to make this image more smoother? There are some straight lines which comes in the image. I have attached the optimized code with this comment.

Sign in to comment.

Answers (0)

Asked:

on 5 Jan 2015

Edited:

on 9 Jan 2015

Community Treasure Hunt

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

Start Hunting!