The values of X should be distinct error.
1 次查看(过去 30 天)
显示 更早的评论
Hi everbody.
ttx=1;
for ggx=1:1:numel(zaman);
n_motor_tamyuk_cevrimsirali(1,ggx)=interp1(tum_veriler_tamyukgucvolkan_sirali,tum_veriler_tamyukdevirvolkan_sirali,abs(Ne(1,ttx)));
ttx=ttx+1;
end
my "tum_veriler_tamyukgucvolkan_sirali" matrix is linear, but "tum_veriler_tamyukdevirvolkan_sirali" and "abs(Ne) matrixs are not linear so matlab gives me tihs error. How can i MAKE this interpolation?
0 个评论
回答(1 个)
Walter Roberson
2015-12-6
编辑:Walter Roberson
2015-12-6
Your tum_veriler_tamyukgucvolkan_sirali has some duplicate values in it.
st = sort(tum_veriler_tamyukgucvolkan_sirali);
dv_idx = find(diff(st) == 0);
if ~isempty(dv_idx) %corrected
fprintf('there are duplicate occurrences of\n');
fprintf('%g ', st(dv_idx) );
fprintf('\n');
end
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Smoothing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!