dev_clear_window()
dev_disp_text('欧几里得距离计算', 'window', 200, 200, 'black','box_color', '#00ffffc0')
V1 := [18.8,132.4,33,19.3]
dev_disp_text('V1='+V1, 'window', 220, 200, 'black','box_color', '#00ffffc0')
V2 := [233.23,32.786,234.4224,63.33]
dev_disp_text('V2='+V1, 'window', 220, 300, 'black','box_color', '#00ffffc0')
Diff := V1 - V2
dev_disp_text('V1-V2='+Diff, 'window', 320, 200, 'black','box_color', '#00ffffc0')
Distance := sqrt(sum(Diff * Diff))
dev_disp_text('V1与V2间的欧几里得距离为'+Distance, 'window', 420, 200, 'black','box_color', '#00ffffc0')
Scalarproduct := sum(V1 * V2)
dev_disp_text('V1与V2的标量积为'+Scalarproduct, 'window', 440, 200, 'black','box_color', '#00ffffc0')
dev_disp_text('V1与V2可以想象成4维空间中不同的两点', 'window', 460, 200, 'black','box_color', '#00ffffc0')
标签:disp,color,text,距离,V1,window,dev,计算,基本操作 From: https://www.cnblogs.com/echo-efun/p/18053328