Differences in using pdist

5 visualizaciones (últimos 30 días)
med-sweng
med-sweng el 26 de Feb. de 2013
Respondida: Raghvendra Kumar el 7 de Jul. de 2020
In using `pdist` in `matlab`. What is the difference between the use of these two forms (notice (,) & (;)?
>> pdist([x,y]);
>> pdist([x;y]);
Thanks.

Respuestas (1)

Raghvendra Kumar
Raghvendra Kumar el 7 de Jul. de 2020
Hi,
Using
>> pdist([x,y]);
>> pdist([x;y]);
where x and y are vector
It will throw an error however suppose you have a vector x = [1,2,3,4];
it would be row majored vector i.e., (1 X 4)matrix as x = 1 2 3 4
and if x = [1;2;3;4];
it would be column majored vector i.e., (4 X 1) matrix as
x = 1
2
3
4

Categorías

Más información sobre Operators and Elementary Operations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by