Guessing the value of the temperature depending of the closest neighbours(3D)
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Sorry if my English isn't really good.
Basically, I got a bunch of temperature sensor in a 3D space (about 1000). Each of those sensor if giving me a temperature reading.
Here's an example :
Sensor #1, XYZ Position : [12,15,53], Temperature : 26
Sensor #2, XYZ Position : [32,25,23], Temperature : 22
etc.
I constructed a [1000x4] matrix in matlab of all the value. Now, I need a function to calculate the temperature of a random point in the XYZ space depending of this database. On my first try, I opted for the 'closest point analysis' approach but the result aren't good enough. I need a smart algorithm that'll give me a more precise temperature value by analyzing the closest neighbours.
Thanks you for your help,
CEL
0 comentarios
Respuestas (1)
David Young
el 15 de En. de 2015
If linear interpolation is sufficient, you can try
interpolant = scatteredInterpolant(m(:,1:3), m(:,4));
temp = interpolant(x,y,z);
This assumes that your data matrix is m and that x, y, z and temperature are the columns in that order.
You can also try natural neighbour interpolation by giving a further argument to scatteredInterpolant.
0 comentarios
Ver también
Categorías
Más información sobre Interpolation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!