Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

interp1

Status
Not open for further replies.

HauserMatlab

Mechanical
Nov 23, 2005
1
Hi,
I've got a problem with the interp1 command.
I use it this way: x = interp1(t0,x0,t);
with t0 = 1345x1 matrix and x0 = 1345x28 matrix and t=3000x1, all double arrays.
There are no NaN in t0 or in x0, but in the result x there are a lot of them.
How can this happen?
Can anyone help me out?

Greets
 
Replies continue below

Recommended for you

Are there elements in your vector "t" which are outside the range of those given in the vector "t0"? By default, any values which are outside the range of the given data are assigned the value "NaN". You can allow extrapolation beyond the the values in "t0" by setting an optional parameter in the "interp1" function. I think you need to pass the string 'extrap' to the function, but check the help infomation to be sure.

M

--
Dr Michael F Platten
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor