?? bits2nec.m
字號:
#!/usr/bin/octave -qH% -q causes Octave to run in 'quiet' mode, -H prevents the commands we use% from being added to Octave's command history.if (nargin ~= 3) fprintf (stderr, 'Usage: bits2nec.m horiz | vert x1 x2\n'); exit (-1);endmax_length = 1;n_segments = 100;diameter = 0.002;frequency = 150;hv = nth (argv, 1);x1 = sscanf (nth (argv, 2), '%f');x2 = sscanf (nth (argv, 3), '%f');if (~strcmp (hv, 'horiz') && ~strcmp (hv, 'vert')) fprintf (stderr, 'Usage: bits2nec.m horiz | vert x1 x2\n'); exit (-2);endif (x1 == 0) x1 = 1;endif (x2 == 0) x2 = 1;endprintf ('CM Automatically-generated NEC script (from bits2nec.m)\n');printf ('CE\n');p1 = -x1 * max_length / 256;p2 = x2 * max_length / 256;segment = floor (x1 / (x1 + x2) * n_segments) + 1;printf ('GW 1 %i 0 0 %f 0 0 %f %f\n', n_segments, p1, p2, diameter);printf ('GE\n');printf ('LD 5 1 0 0 3.767E+07\n');printf ('EX 0 1 %i 0 100\n', segment);printf ('FR 0 1 0 0 %f\n', frequency);if (strcmp (hv, 'horiz')) printf ('RP 0 1 360 0000 90 0 0 1\n');else printf ('RP 0 360 1 0000 0 0 1 0\n');endprintf ('EN\n');
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -