Skip to main content
19-Tanzanite
July 4, 2025
Solved

Floating point error

  • July 4, 2025
  • 1 reply
  • 663 views

Translator
 
 
 
 

 

 

Hi,

I am facing below error. I am reading a .txt file with some data points, and I want to make/have a function like f(x) interpolating teste data points.

Cornel_0-1751631622530.png

Cornel_1-1751631633790.png


Prime 10 file attached.

Best answer by terryhendicott

Hi,

Text file has an error on the last line of the file giving rise to two NaN's at the end of the matrix columns of "a". Have edited out the last line of the text file and it now works

Cheers

Terry

 

1 reply

Cornel19-TanzaniteAuthor
19-Tanzanite
July 4, 2025

Translator
 
 
 
 

 

 
 

Cornel_0-1751633376065.png

Having less data points in txt file.
21-Topaz II
July 4, 2025

Hi,

Text file has an error on the last line of the file giving rise to two NaN's at the end of the matrix columns of "a". Have edited out the last line of the text file and it now works

Cheers

Terry

 

Cornel19-TanzaniteAuthor
19-Tanzanite
July 4, 2025

 

Ok, I see, thanks