필터 지우기
필터 지우기

The values of X should be distinct error.

조회 수: 2 (최근 30일)
Volkan Yangin
Volkan Yangin 2015년 12월 6일
편집: Walter Roberson 2015년 12월 6일
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?

답변 (1개)

Walter Roberson
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
  댓글 수: 1
Volkan Yangin
Volkan Yangin 2015년 12월 6일
Thank you, Walter Roberson. Today i was working on this program and i have found another solution method for my problem. But your code will be required again. Thanks a lot...

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Smoothing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by