how can i fill a vector with result of 4 instructions?

2 次查看(过去 30 天)
hello, assuming that i have:
DE1 = pdist2(vecteur(1),V1(2),'euclidean')
DE2 = pdist2(vecteur(2),V1(2),'euclidean')
DE3 = pdist2(vecteur(3),V1(2),'euclidean')
DE4 = pdist2(vecteur(3),V1(2),'euclidean')
  • how can i write those 4 lignes on one ligne please and store results in a vector?

采纳的回答

Walter Roberson
Walter Roberson 2015-12-24
DE = abs(vecteur([1:3 3]) - V1(2));
Are you sure you did not want the DE4 to use vecteur(4) ?
This code substitution is not applicable if your values happen to be symbolic matrices.
  2 个评论
bay rem
bay rem 2015-12-25
编辑:bay rem 2015-12-25
i wrote it wrong :
DE4 = pdist2(vecteur(4),V1(2),'euclidean')
THANK YOU SO MUCH
bay rem
bay rem 2015-12-25
But here why it is vecteur([1:3 3]) not vecteur([1:3 4])

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Assembly 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by