Increase the resolution of contour

10 ビュー (過去 30 日間)
H ZETT M
H ZETT M 2017 年 6 月 7 日
コメント済み: Mr. 206 2018 年 11 月 22 日
Hello, so I tried to plot a coast line with contour. All I did is: Loading the Data (blue=1 is land, green=0 is water) and
C=contour(U,[1 1],'r');
which gave me this image. It is fine for the coast, but is there any way to get a better resolution for the island ? It seems to be really off at some points.

回答 (1 件)

Asif Iqbal
Asif Iqbal 2017 年 6 月 7 日
I had a kind of similar problem with some discreat data so what I did was use linspace function to create some equally spaced data in between the collected data to create more resolution. The problem being these are manually increased resolution. Theoretically speaking you can't get higher resolution if you don't have the data. So you have to make some. I am giving my algorithm may be you can take a similar approach to generate your code.
d1=rand(50,1); % your data
d2=zeros(500,1); % generated higher resolution data
for i=0:length(d1)-2
d2(i*10+1:((i*10)+10)) = linspace(d1(i+1),d1(i+2),10);
end
d2(491:500)=linspace(d1(end),d1(end),10);
May be you can have an idea how to do yours from this.
  3 件のコメント
Asif Iqbal
Asif Iqbal 2017 年 6 月 7 日
編集済み: Asif Iqbal 2017 年 6 月 7 日
In that case I guess spline might help . Use it to round up the in-between data, not just few more points.
Mr. 206
Mr. 206 2018 年 11 月 22 日
Can you please explain how create this data resolution?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeContour Plots についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by