現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
How can i remove irrelevant information in plotting
5 ビュー (過去 30 日間)
古いコメントを表示
Abdul Sajeed Mohammed
2022 年 2 月 19 日
Hello, i have plotted for error but seems like i have been getting a lot of noise in image. i want to only get the "Orange" highlighted path instead of shaded "grey-black" part. Any suggestions enclosing image below.
9 件のコメント
Voss
2022 年 2 月 19 日
Sorry, I don't read emails.
Perhaps you could construct a similar case (i.e., one that exhibits the same problematic behavior) using made-up data, and share that. Doing that may also give you insight on how to fix the problem.
Abdul Sajeed Mohammed
2022 年 2 月 19 日
編集済み: Walter Roberson
2022 年 2 月 19 日
Ok, i hope i can explain my problem here,
Estimated_Lat = 180 / pi * lat; %Dimension of (1x17341)
Estimated_Long = 180 / pi * lon; %Dimension of (1x17341)
figure;
plot(Estimated_Long, Estimated_Lat,'x','Linewidth',0.5);
hold on
Ground_Truth = xlsread('27');
G_Long = Ground_Truth(:,1); (43x1)
G_Lat = Ground_Truth(:,2); (43x1)
plot(G_Long,G_Lat,'-x','Linewidth',2)
hold off
ylabel('Latitude, [deg]','FontSize', 13);
xlabel('Longitude, [deg]','FontSize', 13);
title('Trajectory of vehicle with position close to Lane level','FontSize', 14)
legend('Estimated trajectory', 'Centre nodes of True trajectory','best')
% To find error between estimated and true trajectory, i used difference as shown below
Error_dataLat = G_Lat - 180 / pi * lat; (43x17341)
Error_dataLong = G_Long - 180 / pi * lon; (43x17341)
plot(Error_dataLong,Error_dataLat)
[ This is the image i have shared below, where instead of only highleghted area more of noise is available ]
Voss
2022 年 2 月 19 日
OK, so the figure is showing just Error_dataLat vs Error_dataLong (because hold is turned off after plotting the previous lines), and each of these are matrices of size 43-by-17341. When you use plot() with matrices, you get one line for each column of the matrix, so that's 17341 lines in this case (each with 43 data points). The line colors cycle through the axes' ColorOrder, and the lines are all on top of one another, so that's why the plot looks like a shaded grey-black region like that.
Rather than plotting those matrices as 17341 lines, maybe it is better to visualize them as two surfaces, something like this (I don't have your data, so I used random numbers but you can just comment out my surf(randn(...)) lines and uncomment the preceding lines that use your variables Error_dataLat/Error_dataLong, and see how that looks):
figure()
subplot(2,1,1);
% surf(Error_dataLat,'EdgeColor','none');
surf(randn(43,17341),'EdgeColor','none');
view([0 90]);
colorbar();
title('Lat Error');
subplot(2,1,2);
% surf(Error_dataLong,'EdgeColor','none');
surf(randn(43,17341),'EdgeColor','none');
view([0 90]);
colorbar();
title('Long Error');
Abdul Sajeed Mohammed
2022 年 2 月 20 日
Hi, there thank you for explaining me the problem. I used your code and have figure, but is it possible for you to explain what actually figure is visualizing. I mean what is figure telling about the errors plotted ?
Voss
2022 年 2 月 20 日
Recall, the errors are defined like this:
Error_dataLat = G_Lat - 180 / pi * lat;
Error_dataLong = G_Long - 180 / pi * lon;
So, yellow color in the surfaces means relatively high positive error (meaning G_Lat > 180 / pi * lat, or, respectively, G_Long > 180 / pi * lon) and blue means high (in magnitude) negative error (so G_Lat < 180/pi*lat, resp., lon).
However, usually error is defined to be in terms of absolute value of the difference if we don't care whether it's positive or negative and we just care about the magnitude, e.g.:
Error_dataLat = abs(G_Lat - 180 / pi * lat);
Error_dataLong = abs(G_Long - 180 / pi * lon);
and that might be more instructive to look at. In that case yellow will be high error using the new definition (i.e., high in magnitude, positive or negative, using the old definition) and blue will be low error (that is, closer to 0, so a better match).
I don't know what the 2 dimensions of the lat/long matrices represent, so I can't comment on what the "spatial" variation across the surface in X or Y might mean.
Abdul Sajeed Mohammed
2022 年 2 月 20 日
Thank you verymuch for your valuable time, your help was very useful for me. :)
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Marine and Underwater Vehicles についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
アジア太平洋地域
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)