Retrieve Structuring Element Shape from Object

조회 수: 1 (최근 30일)
Dourado
Dourado 2018년 6월 14일
댓글: Dourado 2018년 6월 14일
Hello.
I have some matlab structuring elements generated randomly and I would like to retrieve the shape name during runtime. For example:
se=strel('square',3);
shape=SOMEFUNCTION(se);
disp(shape);
And the result would get me 'square'. Is that possible, once when I display "se" variable, it says "strel is a square shaped structuring element..."?
Thank you so much!

답변 (1개)

KSSV
KSSV 2018년 6월 14일
Read about fprintf
se=strel('square',3);
shape=SOMEFUNCTION(se);
fprintf('strel is %s shaped structuring element\n',shape)
  댓글 수: 1
Dourado
Dourado 2018년 6월 14일
Actually what I seek is this "SOMEFUNCTION". I need to discover the shape of a random structuring element.

댓글을 달려면 로그인하십시오.

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by