nf707
Member level 1
- Joined
- Nov 26, 2010
- Messages
- 39
- Helped
- 9
- Reputation
- 18
- Reaction score
- 9
- Trophy points
- 1,288
- Location
- iran
- Activity points
- 1,467
Hello to all
this matlab code was written to plot spiral antenna . and after import to cst
can anyone help what to do this
this matlab code was written to plot spiral antenna . and after import to cst
can anyone help what to do this
Code:
clear all
N = 10; % number of full turns;
step = pi/12; % discretization step (orig pi/6)
b = 0.3; % separation between turns in mm
a = b*step*4/(1-cos(step*4)); % offset from center in mm %orig
a = b*step/(1-cos(step));
n = 1; % power
theta = [0:step:2*pi*N];
r = a + b*theta.^(1/n);
x = r.*cos(theta);
y = r.*sin(theta);
theta = theta + pi;
r1 = a + b*theta.^(1/n);
x1 = r.*cos(theta);
y1 = r.*sin(theta);
plot(x, y, 'b', 'LineWidth', 2);
grid on;
hold on;
plot(x1, y1, 'r', 'LineWidth', 2);
grid on; hold on;
axis('equal');
title('Units - meters')
z = [x' y'];
save('spiral1_new.txt','z','-ASCII');
z = [x1' y1'];
save('spiral2_new.txt','z','-ASCII');
Last edited by a moderator: