find minimum distance value

2 Ansichten (letzte 30 Tage)
Anusha
Anusha am 19 Okt. 2013
Kommentiert: Anusha am 19 Okt. 2013
di = Yk - Wi where i = 1.... Q and k=1...M
Y =
0
0.693062745098039
0.369047058823529
0.299000000000000
0.345615686274510
0.356407843137255
0
0
W=
0.890903252535799
0.959291425205444
0.547215529963803
0.138624442828679
0.149294005559057
0.257508254123736
0.840717255983663
0.254282178971531
what is the output of di?
  2 Kommentare
Anusha
Anusha am 19 Okt. 2013
ADD
di=|yk-Wi|
Anusha
Anusha am 19 Okt. 2013
one element at each iteration from y

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Walter Roberson
Walter Roberson am 19 Okt. 2013
[Yk, Wi] = meshgrid(Y, W);
min(Yk - Wi, 1)
min(Yk - Wi, 2)
  4 Kommentare
Anusha
Anusha am 19 Okt. 2013
ok
Anusha
Anusha am 19 Okt. 2013
min(Yk - Wi, 1)
min(Yk - Wi, 2)
whats the meaning of 1,2

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by