problem using medfilt2
13 ビュー (過去 30 日間)
古いコメントを表示
Harald von der Osten
2020 年 2 月 10 日
コメント済み: Harald von der Osten
2020 年 2 月 10 日
Attached you can find the data. Please rename .csv to .dat, and just use:
load cond2a.dat
Ax=cond2a(:,1);
Ay=cond2a(:,2);
Az=cond2a(:,3);
Znew=medfilt2(Az);
The file contains xyz with z values around 169. But using medfilt2 at the four corners the data is 0. How can I prevend this?
Thanks a lot,
Harry
0 件のコメント
採用された回答
Subhadeep Koley
2020 年 2 月 10 日
Your Az vector is mainly concentrated around 169, therefore normal median filtering destroys the sudden peaks. Using Padding option as 'symmetric' might help. Refer the code below.
load cond2a.dat
Ax = cond2a(:, 1);
Ay = cond2a(:, 2);
Az = cond2a(:, 3);
Znew = medfilt2(Az, 'symmetric');
figure; plot(Az);
hold on;
plot(Znew);
legend({'Original Data', 'Median filtered data'});
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!