Retrieve Structuring Element Shape from Object

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 个)

Read about fprintf
se=strel('square',3);
shape=SOMEFUNCTION(se);
fprintf('strel is %s shaped structuring element\n',shape)

1 个评论

Actually what I seek is this "SOMEFUNCTION". I need to discover the shape of a random structuring element.

请先登录,再进行评论。

产品

版本

R2017a

提问:

2018-6-14

评论:

2018-6-14

Community Treasure Hunt

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

Start Hunting!

Translated by