What is the difference between 'rectangle' and 'rect'

7 ビュー (過去 30 日間)
민석 김
민석 김 2021 年 2 月 25 日
編集済み: Stephen23 2021 年 2 月 25 日
Hi, I was making code for crop image
then I found something
--------------------------------------------------------
Editor
I = imread(list(1).name);
[I2, rectangle] = imcrop(I)
rectangle(1,1)
rect(1,1)
---------------------------------------------------------
Command Window
rectangle =
424.5100 545.5100 110.9800 85.9800
ans =
424.5100
ans =
372.5100
-----------------------------------------------------------
What is the difference between 'rectangle' and 'rect'?
and which is the corret for crop image?
[I2, rectangle] = imcrop(I) or [I2, rect] = imcrop(I)?
  1 件のコメント
Stephen23
Stephen23 2021 年 2 月 25 日
編集済み: Stephen23 2021 年 2 月 25 日
which rect
'rect' not found.
which rectangle
built-in (/MATLAB/toolbox/matlab/graphics/primitive/rectangle)
"What is the difference between 'rectangle' and 'rect'?"
rectangle is the name of an inbuilt function.
rect is not the name of an inbuilt function.
Apart from that, I do not see much different between them. Either of them can be used as variable names (but it would not be advisable to knowlingly shadow the rectangle function).
Apparently you have both variables defined in your workspace: is that what your question is about?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by