wsn importing data data from other file

load H11; % load file name say H11
r1 = H11(1:100,2); %2,3 and 7th sensors are closely deployed
r2 = H11(1:100,3);
r3 = H11(1:100,7);
If h11 file contains sensing data of all sensor...then how we can replace this code with actual sensing data.....can you give me some example for replacing this file with actual sensing data here itself

1 commentaire

Sumit
Sumit le 20 Nov 2011
if h11 file contain 3 sensor and there respective sensing data say
sensor 2: 1,1.1,1.2,1,1.4,1.4,3,1.7,1.9,1.6
sensor 3: 3,1.7,1.9,1.1,1.2,1,2.6,2,2.1,4
sensor 7: 1.7,2,1.9,1.2,1,1.4,1.7,1,2,1,2
then can u tell me how we can replace r1=h11(1:100,2) same for r2,r3
can you please elaborate it
thax for your reply
i.e.can u tell me how we can replace (r1,r2,r3)
r1=h11(1:100,2)
r2=h11(1:100,3)
r3=h11(1:100,7)
with the actual value.....

Connectez-vous pour commenter.

 Réponse acceptée

Image Analyst
Image Analyst le 20 Nov 2011
I think that should work if H11 is both a string that is the filename, i.e. 'H11.mat' and it is also the name of the array stored inside the H11.mat file. So, prior to this you, or someone, would have created a file called H11.mat by doing something like
save('H11.mat', 'H11');
to save the H11 array in "H11.mat" file. Then, r1 will give the first 100 elements in column 2 of H11, and similar for r2 and r3. I'm not sure what you mean by "actual sensing data" - isn't that what's in the H11 array that you read in from the mat file?

1 commentaire

Sumit
Sumit le 20 Nov 2011
if h11 file contain 3 sensor and there respective sensing data say
sensor 2: 1,1.1,1.2,1,1.4,1.4,3,1.7,1.9,1.6
sensor 3: 3,1.7,1.9,1.1,1.2,1,2.6,2,2.1,4
sensor 7: 1.7,2,1.9,1.2,1,1.4,1.7,1,2,1,2
then can u tell me how we can replace r1=h11(1:100,2) same for r2,r3
can you please elaborate it
thax for your reply

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur WSNs dans Centre d'aide et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by