Borrar filtros
Borrar filtros

comparing results from matlab calculation with a table from excel

2 visualizaciones (últimos 30 días)
badrul hisham
badrul hisham el 10 de Abr. de 2016
Comentada: John D'Errico el 10 de Abr. de 2016
hi, i have a set of data saved in excel and i need to compare it with the calculation result from matlab.in my situation, i have calculated the height and get 54 inches, next i got 1.65 of trunk index,71lbs, and a value of 4. I need to find which row 54 inch is at(as you can see there are 9 rows which contains the number 54),out of all the 54 inch,find where the 1.65 of trunk index is at,next find whether value 4 is in column endo,meso,ecto or balanced.the final result would show the name of the category. for example, in row 9 of the excel, it is 54 inches,1.65 trunk index,and 4 is meso. so the output would say that the category is meso. can someone please show me how to do this? inches,trunk index and value 4 are my input from several calculations. i have attached together the excel file and an image. please help me, thanks in advance
  2 comentarios
dpb
dpb el 10 de Abr. de 2016
Can you be sure there is and exact match on the three variables of Ht, Tidx, Wt? Matching floating point computation exactly is fraught with danger firstly, and secondly; would require a pretty good computational correlation to hit the values identically it would seem. What if you get 54, 1.63 and 70, instead? Or, even if the first three are somehow constrained to be in the precise bins and in those particular relationships, will the last be identically one of the specific choices?
John D'Errico
John D'Errico el 10 de Abr. de 2016
And of course, the fear is that your computation would yield 1.6499999999999... which IS less than 1.64.
It is always important to watch for floating point errors.

Iniciar sesión para comentar.

Respuestas (0)

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by