Can any one please help me with the following code?
Afficher commentaires plus anciens
%this script puts together plot data showing the upsweep IF vs. range for
%stationary targets when using a 200, 800, and 1200 MHz bandwidth, while
%keeping the chirp time at a constant 1.024 ms.
close all;
clear all;
clc;
rmax = 300; %max range to plot
c = 299704764; %speed of light in m/s
f0 = 77e9;
tchirp = 1.024 * 10^(-3); %chirp time in seconds
bandwidth = [200 800 1400 2000].* 10^6; %sweep bandwidth in Hz
k = bandwidth ./ tchirp; %sweep rate
r = 0:1:rmax; %range in metres
IF = 2*k'*r/c;
v = (c * IF)/ (2 * f0);
csvwrite('test.csv', [r' IF' v']);
figure (1);
hold on;
plot(IF')
xlabel ('range/m')
ylabel ('IF/Hz')
grid on
figure (2);
hold on;
plot(IF', v')
xlabel ('IF/Hz')
ylabel ('velocity m/s')
grid on
Here IF is calculated for a series of values for r.
How can I do the opposite, Calculate the value of r for the series of values of IF. And what does the k' mean....? I mean the ' symbol after k?
1 commentaire
Walter Roberson
le 9 Juil 2012
The ' operator is Conjugate Transpose. The effect in this code is going to be to take the row vector value of k and use it as a column vector instead.
Réponses (2)
Honglei Chen
le 9 Juil 2012
Modifié(e) : Honglei Chen
le 9 Juil 2012
As Walter mentioned, ' operator is conjugate transpose. As to this case, because k is real, it is simply transpose to make it a column vector.
You have the equation in your code,
IF = 2*k'*r/c
so to get r from IF, you can do
r = IF(1,:)*c/(2*k(1))
Ahmed
le 9 Juil 2012
0 votes
2 commentaires
Walter Roberson
le 9 Juil 2012
Try .* and ./
Honglei Chen
le 9 Juil 2012
I updated the previous answer, sorry I was writing an equation more than writing the code. I think I understand why the original code use k' now, it is simply trying to get IF for all the combination of k and r. Since r is the same for each k, when converting back, you only need one slice of IF.
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!