plot a complex data
Show older comments
I have been trying to plot a data of magnetic fields obtained from a commercial software. So, far my code is:
[dataBx, dataBy, dataBz]= ReadData(infoFile, gemFile, dataFileBxr, dataFileBxi, dataFileByr, dataFileByi,dataFileBzr, dataFileBzi);
x = (dataBx);
y = (dataBy);
z = (dataBz);
img = (((imag(x) - ((1i)).*(imag(y))/2)));
clims = [min(min(img)) max(max(img))*1E-1];
subplot(2,1,1);
hold all
plot (img)
colormap jet;
subplot(2,1,2);
h_img = imagesc(rms(img));
axis square;
colormap jet;
dataBx, dataBy and dataBz consists of complex numbers which I read in first two line. Then, I stored it in x, y and z respectively. Then, I used the formula: (img=(B1x-B1y)/2). So, here in this code, I represented B1x as x and B1y as y.
Then, I tried to plot it and get the value of magnetic field in colormap values as I obtained from a commercial software. But, I am not able to get that value. I don't know what is wrong here. Can anyone suggest me something? I have tried a lot of things but I am not able to work it out.
May be the formula of clims is wrong.
2 Comments
John
on 9 Jan 2015
Accepted Answer
More Answers (0)
Categories
Find more on Images in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!