Receiving an interpolate error.
2 ビュー (過去 30 日間)
古いコメントを表示
Trying to normalise my data to 101 points but receiving the error: Error using griddedInterpolant Interpolation requires at least two sample points in each dimension.
Error in interp1 (line 186) F = griddedInterpolant(X,V,method); Using the code: Number_of_Steps = length(Touch_Down);
for i=1:Number_of_Steps data=mm3(Touch_Down(i,1):Toe_Off(i,1),2); %data is used from one starting point to the next starting point filt_pressure(:,i)=interp1(1 : length(data) , data , linspace(1, length(data),100)); %interp1(original structure, values , new structure end;
When running the code it interpolates a few columns of data for the filt_pressure but does not interpolate every single one of them and I'm not sure why.
Any help is much appreciated.
0 件のコメント
回答 (1 件)
John D'Errico
2017 年 5 月 23 日
READ THE ERRORR MESSAGE! LOOK AT YOUR DATA!
[Touch_Down,Toe_Off]
ans =
218 225
245 253
272 280
285 285
287 287
299 307
326 334
339 342
353 361
380 388
407 414
418 418
434 441
444 452
461 469
472 475
489 496
502 503
516 524
543 550
569 577
597 604
623 631
651 659
678 686
705 714
733 741
760 769
788 796
815 823
842 850
869 877
896 904
924 931
950 958
977 985
1004 1012
1031 1040
1059 1067
1086 1094
1113 1121
1139 1147
1165 1174
1193 1201
1221 1229
1249 1257
1276 1284
You have this:
data=mm3(Touch_Down(i,1):Toe_Off(i,1),2);
How long is the vector:
Touch_Down(i,1):Toe_Off(i,1)
when i == 4, or 5, or 6? In those cases, what is length(data)?
Now go back and re-read the error message.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!