2次元ベクトルフィールドのプロット
champ() // example champ(x, y, fx, fy) champ(x, y, fx, fy, arfact) champ(x, y, fx, fy, arfact, rect) champ(x, y, fx, fy, arfact, rect, strf) champ(x, y, fx, fy, <opt_args>) hdl = champ(...)
vectors of decimal numbers, which define the grid of nodes = coordinates of arrows starting points.
ベクトルフィールドのx要素を記述する行列.
fx(i,j)
は点(x(i),y(j))
における
ベクトルフィールドのx要素です.
ベクトルフィールドのy要素を記述する行列.
fy(i,j)
は点(x(i),y(j))
における
ベクトルフィールドのy要素です.
一連の命令
key1=value1,key2=value2
,... を表します.
ただし, key1
,
key2,...
には以下のどれかを指定可能です: arfact, rect,
strf (以下参照).
実数型のオプションの引数で, プロット時の矢じりの表示用のスケールファクタを指定します. (デフォルト値は 1.0).
使用するグラフィックフレームの境界を指定する
ベクトルrect=[xmin,ymin,xmax,ymax]
.
長さ3の文字列 "xyz" で,plot2d
の
strf
パラメータと意味は同じです.
最初の文字xはchamp
では意味がありません.
このオプションの出力には、作成された Champ エンティティへのハンドルが含まれます。 h
を使用してプロパティを変更します。
プロパティのリストについては、fec_properties を参照してください。
champ(…)
plots a field of 2D vectors with arrows.
By default, all arrows have the same color, and their length is proportional to the local intensity of the field (norm of vectors). In addition, all lengths are normalized according to the longest arrow.
When setting hdl.colored = "on"
,
each arrow becomes as long as possible in its cell, and is colored
according to the local intensity of the field.
After calling champ(…)
, gce()
returns the handle of the field of arrows, of type Champ
,
whose properties can be post-processed.
コマンド champ()
を入力するとデモが表示されます.
x = -4:6; X = ndgrid(x); [fx, fy] = (rand(X)-0.5, rand(X)-0.5); clf gcf().color_map = jet(50); // Field's intensity = arrows length subplot(2,2,1) champ(x, x, fx, fy) // With bigger arrow heads subplot(2,2,2) champ(x, x, fx, fy, arfact=1.7) title("arfact=1.7", "fontsize",3) // Field's intensity = arrows color xsetech([0 0.5 0.55 0.5]) h = champ(x, x, fx, fy, arfact=1.7) h.colored = "on"; title("arfact=1.7, .colored=""on""", "fontsize",3) colorbar // Field's intensity = color, + imposed boundaries subplot(2,2,4) h = champ(x, x, fx, fy, rect=[-5,-6,9,7],strf="011") h.colored = "on"; title("rect=[-5,-6,9,6], strf=""011"", .colored=""on""", "fontsize",3) gcf().axes_size = [740 680]; | ![]() | ![]() |
x = -1.2:0.11:0.7; y = -1:0.11:0.5; [X, Y] = ndgrid(x, y); [fx, fy] = (2*X, 2*Y); clf xsetech([0 0 0.45 1]) champ(x, y, fx, fy) title(".colored = ""off"" (default)", "fontsize",3) xsetech([0.45 0 0.55 1]) h = champ(x, y, fx, fy) title(".colored = ""on""", "fontsize",3) gcf().color_map = jet(100); colorbar | ![]() | ![]() |
Version | Description |
2025.0.0 | Function returns the created handle(s). |