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
回答 (1 件)
Walter Roberson
2012 年 5 月 21 日
0 投票
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 件のコメント
UMP
2012 年 5 月 22 日
UMP
2012 年 5 月 22 日
Walter Roberson
2012 年 5 月 22 日
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.
Walter Roberson
2012 年 5 月 22 日
Note: if you need a reply within a particular time-frame, please hire a consultant. I need my sleep.
UMP
2012 年 5 月 30 日
Walter Roberson
2012 年 5 月 30 日
[maxpeak, maxpeakidx] = max(TheData);
[minpeak, minpeakidx] = min(TheData);
UMP
2012 年 5 月 30 日
カテゴリ
ヘルプ センター および File Exchange で Language Fundamentals についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!