Why wont interpolation work
4 views (last 30 days)
Show older comments
Im trying to interpolate some data with interp1 which looks like
10000 0.002078592
7943.282 0.001956255
6309.573 0.001852454
and so on. however later on there nans, which I have replace with zeros. Im continously getting the message 'The grid vectors are not strictly monotonic increasing.' This is the code im looking to fix
a=xlsread('EIS_data/DK40AH_25degC.xlsx');
b=xlsread('EIS_data/DK40AH_-5degC.xlsx');
c=xlsread('EIS_data/DK40AH_-10degC.xlsx');
d=xlsread('EIS_data/DK40AH_-20degC.xlsx');
%Replace nans
ix = isnan(a);
a(find(ix)) = 0;
ix = isnan(b);
b(find(ix)) = 0;
ix = isnan(c);
c(find(ix)) = 0;
ix = isnan(d);
d(find(ix)) = 0;
a1 = a(:,1);
a2 = a(:,2);
interp1q(a1,a2,frq)
any help would be appreciated.
Thanks
James
0 Comments
Answers (1)
See Also
Categories
Find more on Get Started with 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!