Borrar filtros
Borrar filtros

How to compare values between two NxM matrices

3 visualizaciones (últimos 30 días)
Christopher
Christopher el 18 de Jun. de 2024
Comentada: Christopher el 18 de Jun. de 2024
Hello everyone!
I'm still pretty new to MatLab, and am getting familiar with how to operate it, so I am looking for some ideas as to how to best tackle this problem. It seems like a FOR loop to compare the minimums would be the best way to tackle this, but I'm not sure.
I have two matrixes that I need to examine for a discrepancy between expected altitude and measured altitude. I need to compare a matrix of DEM data (1x1920) against a matrix of retrieved altitudes (820x1920). I need to index the columns where there the altitude plots below the DEM, and examine the difference between the two matrices.
The example below provides an outline of the problem. The white line represents recorded DEM data, and the curtain represents the data I need to examine to determine if there was an error with the recorded altitude. For example, the DEM data below, idx(1,563) shows .5767, and the altitude at that same point shows idx(773,563) shows a value of 1.0735. So there is no numerical correlation between the value of the DEM and the value of the altitude (since it seems more akin to a bar graph).
Any help getting started with this would be much appreciated!
  4 comentarios
Umar
Umar el 18 de Jun. de 2024
You can adapt this code snippet to your specific data and further analyze the identified columns to understand the discrepancies between the altitude and DEM data. This should help you get started on tackling the problem efficiently in Matlab.
Christopher
Christopher el 18 de Jun. de 2024
Thank you for providing the basis for a loop! I adapted it, and it reported that every column had a difference, so I'll have to make sure I look at indexing the end of the altitude data and comparing against the appropriately indexed DEM data.

Iniciar sesión para comentar.

Respuesta aceptada

Voss
Voss el 18 de Jun. de 2024
discrepancy_columns = find(any(altitude_data<DEM_data,1));
  1 comentario
Christopher
Christopher el 18 de Jun. de 2024
Thank you for providing a starting point! I'll make sure I adapt this code so that it loops through the matrices and finds areas where there is a discrepancy.

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Productos


Versión

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by