finding (x,y) points for each Z
6 ビュー (過去 30 日間)
古いコメントを表示
Hi there,
I'm plotting all my values of the magnitude (in Tesla) of an induced magnetic field against a meshgrid which are the distances.
What I need to know are the distances (x,y) for all magnitudes of my field, but I can't link them togehter. Does someone know how to
acces these values for each z value ?
Thanksin advance
R = linspace(-0.04,0.04,N); % target points [m]
Z = linspace(0.001,0.04,N); % target points [m]
[R2,Z2] = meshgrid(R,Z);
[Br,Bz] = soleno_calcB(R2,Z2,Rin,Rout,Zlow,Zhigh,Itot,Nloop);
surf(R2,Z2,Bz);
title('Induced Magnetic field of detection coil')
xlabel('lateral distance [m]')
ylabel('axial distance [m]')
1 件のコメント
Walter Roberson
2020 年 5 月 20 日
Do I understand correctly, that you want to find the unique() Bz values, and for each one, construct a list of (R, Z) pairs that give that exact Bz value? So a list of Bz values, and a cell array of [R,Z] for each of those ?
採用された回答
Ameer Hamza
2020 年 5 月 20 日
Bz, R2, and Z2 are already 2D matrices of the same size, so their corresponding values lie at the same index. For example, Bz(i,j) corresponds to R2(i,j) and Z2(i,j). However, If you want to have a linear list then do something like this
B = Bz(:);
RZ = [R2(:) Z2(:)]
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!