フィルターのクリア

Differences in using pdist

2 ビュー (過去 30 日間)
med-sweng
med-sweng 2013 年 2 月 26 日
回答済み: Raghvendra Kumar 2020 年 7 月 7 日
In using `pdist` in `matlab`. What is the difference between the use of these two forms (notice (,) & (;)?
>> pdist([x,y]);
>> pdist([x;y]);
Thanks.

回答 (1 件)

Raghvendra Kumar
Raghvendra Kumar 2020 年 7 月 7 日
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

カテゴリ

Help Center および File ExchangeOperators and Elementary Operations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by