Problem with extrapolation and interpolation using excel data

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)

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

Sorry for asking this, can you show me how to solve it.I have really no idea for starting the command.
Walter Roberson..please help me
You have not indicated what you want to interpolate or extrapolate, and you have not indicated what the underlying mathematical model is for your data.
Note: if you need a reply within a particular time-frame, please hire a consultant. I need my sleep.
Walter Roberson:Sorry if I disturb you again..I have go through this m.file. This is the link:http://www.mathworks.com/matlabcentral/fx_files/6170/1/smooth_diff.jpg from Jianwen Luo.This is a nice work and good reference but I really want to know how I can find the maximum and minimum peak from this graph?I want to use [pks locs]=peakfind() but I do not know how to manipulate it.Again,I need your help.
[maxpeak, maxpeakidx] = max(TheData);
[minpeak, minpeakidx] = min(TheData);
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 Language Fundamentals in Help Center and File Exchange

Asked:

UMP
on 21 May 2012

Community Treasure Hunt

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

Start Hunting!