How to change the class of a matrix to "finite" and fix this error: "??? Undefined function or method 'finite' for input arguments of type 'single'"?

2 views (last 30 days)
Hi guys!
I have the following data:
Name Size Bytes Class
data 254208x1 2033664 double
When i run my routine t_tide.m, the following error appears:
"??? Undefined function or method 'finite' for input arguments of type 'double'.
Error in ==> t_tide at 355
ii=find(finite(jref));"
Then i tried change my data by "data2=isfinite(data)", but with this, my new data are not finite class:
Name Size Bytes Class Attributes
data2 254208x1 1016832 single
And the error persists:
"??? Undefined function or method 'finite' for input arguments of type 'logical'.
Error in ==> t_tide at 268
gd=find(finite(xin(1:nobsu)));"
How can i fix this? How can i transform my data class to finite one?
grateful already,
Gustavo

Accepted Answer

Matt J
Matt J on 10 Jan 2014
Edited: Matt J on 10 Jan 2014
There is no "finite" class. Whoever wrote your code used a function called finite() possibly as an alias for the built-in one isfinite(). The safest thing would be to obtain the finite() function from whoever authored your code.
Failing that, you'll have to take your best guess as to what finite() is supposed to do and write your own version in an appropriate place, e.g.,
function tf=finite(x)
tf=isfinite(x);

More Answers (0)

Community Treasure Hunt

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

Start Hunting!