Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski 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
Joined
Nov 23, 2005
Messages
1
Location
DE
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
 
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.

Similar threads

Part and Inventory Search

Sponsor

Back
Top