BookmarkSubscribeRSS Feed
scad
Calcite | Level 5

Hi,

I have a problem....

I want to calculate  sequentially using Euclidean distance

please help me

2 REPLIES 2
ballardw
Super User

What have you tried so far?

 

It is very hard to code from pictures and cryptic arrows with random values really do not describe an algorithm. Is the arrow a sum? division? accumulation? what.

 

This is such a small number of records you should be able to write out the exact calculation you need, at least in terms of + * / or - symbols. That we may be able to show how to code.

 

Do you have a SAS data set to work with?

PGStats
Opal | Level 21

SAS has a function to calculate Euclidian distance

 

distance = EUCLID(dist1, dist2);

 

https://documentation.sas.com/?docsetId=lefunctionsref&docsetTarget=p01uvzvdpw514in18j8xy1hwsd8d.htm... 

PG

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

Register now

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 918 views
  • 0 likes
  • 3 in conversation