Problem with extrapolation and interpolation using excel data

5 views (last 30 days)
Anyone know about interpolation and extrapolation method for excel data?i have no idea even from matlab central. This is what i have done but get stuck. Please anyone..
%imported data from excel sheet
x=xlsread('Data_Test.xls','B4:B65536');
%signal plot
figure
%t from workspace
plot(t,x);
title('Ripple current');
xlabel('Time');
ylabel('Voltage');
grid on

Answers (1)

Walter Roberson
Walter Roberson on 21 May 2012
Once the data has been read in, MATLAB does not know or care that it came from Excel. Just use any appropriate interpolation or extrapolation routine.
You can use interp1() if your data happens to be modeled by one of a small number of mathematical functions. But depending on what the underlying physics is of your data, you might have to use linear regression or nonlinear regression or something from the Curve Fitting Toolbox.
If you do not know the form of the equation underlying your data, then you might as well use a random number generator to do the interpolation or extrapolation: the results so obtained would be at least as mathematically valid as anything else under those circumstances.
  7 Comments
Walter Roberson
Walter Roberson on 30 May 2012
[maxpeak, maxpeakidx] = max(TheData);
[minpeak, minpeakidx] = min(TheData);
UMP
UMP on 30 May 2012
Walter Roberson:What about the windows range?It seem to plot along the signal.Do i need to some adjustment?I don't really get it.Sorry for this inconvenience.

Sign in to comment.

Categories

Find more on Data Import from MATLAB in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!