フィルターのクリア

How to calculate euclidean from Geodesic distance in matrix

10 ビュー (過去 30 日間)
Kong
Kong 2020 年 3 月 11 日
回答済み: Shresth Sharma 2020 年 3 月 19 日
Hello.
I wanna calculate Geodesic distance from euclidean distance in matrix.
I have a code pairwise euclidean distance.
clear all
close all
X = csvread('running43.csv');
n = size(X,1);
D1 = pdist(X);
D1 = squareform(D1)/norm(D1,2);

採用された回答

Shresth Sharma
Shresth Sharma 2020 年 3 月 19 日
Hi,
I assume you are trying to calculate the Geodesic distance from the Euclidean distance and the code you have posted is calculating the Euclidean distance. In the following code instead of using ‘csvread’ it is recommended to use ‘readmatrix’ commands on the newer versions of MATLAB after 2019a. For calculation of the Geodesic distance you can use the method bwdistgeodesic for the matrix D1.
D= bwdistgeodesic(D1,C,R)
This will compute the geodesic distance transform from the matrix.
For more information for calculation Geodesic distance you can go through these documentation links:

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeHypothesis Tests についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by