Reputation:
I am doing a mini project and i am stuck with a code. My project is based Positioning.
I have used a GUI to get the original and estimated position of a target.
I have placed 8 nodes to test.
In this the first four are reference nodes and the next four are random position of the unknown nodes.
cors = [6.62650602409639 194.444444444445;
6.62650602409639 10.6837606837607;
192.168674698795 7.83475783475797;
192.168674698795 191.595441595442;
70.4819277108434 171.652421652422;
129.518072289157 168.803418803419;
24.6987951807229 144.586894586895;
42.7710843373494 79.0598290598291];
I want to plot the graph between x and y co-ordinates.
I have used TOA to estimate the position of target and I got the following output.
cors_est = [6.62650602409639 194.444444444445;
6.62650602409639 10.6837606837607;
192.168674698795 7.83475783475797;
192.168674698795 191.595441595442;
70.7600705547484 171.847603055024;
129.443055817301 168.734648868329;
25.01956026761 144.890243978875;
42.6058125534278 79.1446327727804];
From this, I have calculated the difference between cors
and cors_est
, let it be le(x)
and le(y)
where le
is the localization error.
And with the data I have calculated mean(x)= summation of le(x)/8;
similarly,
mean(y)=le(y)/8;
ΔX = LE(X) − Mean(X)
ΔY = LE(Y) − Mean(Y)
Now i need some guidance in doing the following tasks :
To calculate the stdx=square of (ΔX)
and stdy=square of (ΔY)
and then,
stdxy=summation of ((ΔX)+(ΔY))/N
Actually if I take the square root of the above data, I will get the standard deviation.
Please guide me with this.
Waiting for some good guidance :)
Upvotes: 0
Views: 1136
Reputation: 12345
I think you're making this too hard. How about:
meanXandY = mean(cors - cors_est, 1);
And
stdXandY = std(cors - cors_est, 0, 1);
Upvotes: 2