Thread Subject: Strech a vector by interpolation

Subject: Strech a vector by interpolation

From: Sachitha Obeysekara

Date: 12 Sep, 2007 13:48:02

Message: 1 of 4

Hi,
If I have a vector "data" of size 1x73, is there a way to
obtain a vector "data2" of size 1x100 by interpolating the
data vector?

Subject: Strech a vector by interpolation

From: Steven Lord

Date: 12 Sep, 2007 13:50:39

Message: 2 of 4


"Sachitha Obeysekara" <sachitha.2.obeysekara@gsk.com> wrote in message
news:fc8qmi$t4i$1@fred.mathworks.com...
> Hi,
> If I have a vector "data" of size 1x73, is there a way to
> obtain a vector "data2" of size 1x100 by interpolating the
> data vector?

HELP INTERP1.

--
Steve Lord
slord@mathworks.com


Subject: Strech a vector by interpolation

From: Sachitha Obeysekara

Date: 12 Sep, 2007 14:01:08

Message: 3 of 4


>
> HELP INTERP1.
>
> --
> Steve Lord
> slord@mathworks.com
>
>

i've seen this function already, and i couldn't think of a
fast way to strech the orignal vector using this...

thanks,
sach

Subject: Strech a vector by interpolation

From: Titus

Date: 12 Sep, 2007 14:08:51

Message: 4 of 4


"Sachitha Obeysekara" <sachitha.2.obeysekara@gsk.com> schrieb im Newsbeitrag
news:fc8rf4$eem$1@fred.mathworks.com...
>
>>
>> HELP INTERP1.
>>
>> --
>> Steve Lord
>> slord@mathworks.com
>>
>>
>
> i've seen this function already, and i couldn't think of a
> fast way to strech the orignal vector using this...
>
> thanks,
> sach

Hi,

data2 = interp1(1:73, data, linspace(1,73,100));

If you have some time-vector t corresponding to your data:
data2 = interp1(t, data, linspace(t(1),t(end),100));

Titus


Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
interp Sachitha Obeysekara 12 Sep, 2007 09:50:25
interpolation Sachitha Obeysekara 12 Sep, 2007 09:50:25
strech Sachitha Obeysekara 12 Sep, 2007 09:50:25
rssFeed for this Thread

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com