Differences in using pdist
조회 수: 1 (최근 30일)
이전 댓글 표시
In using `pdist` in `matlab`. What is the difference between the use of these two forms (notice (,) & (;)?
>> pdist([x,y]);
>> pdist([x;y]);
Thanks.
댓글 수: 0
답변 (1개)
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
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!