How to plot gaussian curve for each data point of boundary ?

2 ビュー (過去 30 日間)
Charu
Charu 2023 年 6 月 2 日
回答済み: Image Analyst 2023 年 8 月 8 日
  3 件のコメント
Charu
Charu 2023 年 6 月 6 日
Its an extracted boundary from an image . Actually i want to calculate RMSF (ROOT MEAN SQUARE FLUCTUATION ) at each point between two images (deviated one and non deviated one)..and want to plot as pdf (probability density function) as gaussian curves with the calculation of skewness and kurtosis.
Mann Baidi
Mann Baidi 2023 年 8 月 8 日
It would be helpful if you can describe more about the issue

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

回答 (1 件)

Image Analyst
Image Analyst 2023 年 8 月 8 日
If you have the Statistics and Machine Learning Toolbox, what I'd try is pdist2 and put in the boundaries of both curves. Then for each row you can find out which two points are closest to each other. Then get the average of those closest distances. Something like (untested)
distanceMatrix = pdist2(xyRef, xyTest);
[rows, columns] = size(distanceMatrix)
% Allocate arrays for closest distances.
closestColDistances = nan(1, columns);
closestRowDistances = nan(1, rows);
% Get rid of zeros (distance of point to itself)
distanceMatrix(distanceMatrix==0) = inf; % Set to infinity.
% Get distances of ref curve to test curve.
for row = 1 : rows
closestRowDistances = min(distanceMatrix(row, :));
end
% Get distances of test curve to ref curve.
for col = 1 : columns
closestColDistances = min(distanceMatrix(:, col));
end
% Get the average distance.
averageDistance = mean([closestRowDistances, closestColDistances])
You need to get the distances both ways because if you only look at, say, the distance from the ref to the test, there may be some points on the test curve that are not closest and then they would not contribute to the average distance.

カテゴリ

Help Center および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by