Matlab Program - GEt S11 from a textfile
时间:04-10
整理:3721RD
点击:
Hi.. I took S11 measurement results for an antenna structure.
I got it in a textfile.
with this format
real part, imaginary part
Now i want to convert this into the S11 parameter value using
20 log (base 10) mod(real part + j*imaginary part)
So that i get the output as the S11 parameter value that I can use to make a graph.
Can someone pls tell me how to write this matlab program / upload this.
i am not able to figure out these things:
1. How to call this textfile in the program
2. How to write the code saying that before the comma sign, we have the real part.. and after the comma part it is the imaginary part. (how to parse it)
Thanks :D
I got it in a textfile.
with this format
real part, imaginary part
Now i want to convert this into the S11 parameter value using
20 log (base 10) mod(real part + j*imaginary part)
So that i get the output as the S11 parameter value that I can use to make a graph.
Can someone pls tell me how to write this matlab program / upload this.
i am not able to figure out these things:
1. How to call this textfile in the program
2. How to write the code saying that before the comma sign, we have the real part.. and after the comma part it is the imaginary part. (how to parse it)
Thanks :D
>> load 'my_file.txt'
>> whos
Name Size Bytes Class Attributes
my_file 3x2 48 double
>> my_file
my_file =
1 2
3 4
5 6
>> my_file_dB=20*log10(abs(my_file(:,1)+j*my_file(:,2 )))
my_file_dB =
6.9897
13.9794
17.8533
>> my_file_phase=180/pi*angle(my_file(:,1)+j*my_file(:,2))
my_file_phase =
63.4349
53.1301
50.1944
>>
awesome ! thanks a lot
