Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

how to save decision tree view (classification tree viewer) ?

Asked by Abdullah

Abdullah (view profile)

on 23 Mar 2013

I create a decision tree for classification. After viewing the tree in matlab, how do I save the view in a png or tiff format ? I couldn't find any help for this anywhere.

0 Comments

Abdullah

Abdullah (view profile)

4 Answers

Answer by Tom Lane

Tom Lane (view profile)

on 23 Mar 2013

On Windows at least, choose "Save As" from the File menu. You can save a .fig file, but also various graphics file types.

0 Comments

Tom Lane

Tom Lane (view profile)

Answer by Abdullah

Abdullah (view profile)

on 23 Mar 2013

It is a classification tree viewer. So there is no any "Save As" option on File menu.

1 Comment

Tom Lane

Tom Lane (view profile)

on 24 Mar 2013

Are you on Windows? I'm looking at the viewer right now. It's a figure, and has a File menu, with items New, Open, Close, Save, Save As, ...

Abdullah

Abdullah (view profile)

Answer by Abdullah

Abdullah (view profile)

on 24 Mar 2013

Is there anybody can answer my problem?

0 Comments

Abdullah

Abdullah (view profile)

Answer by Sergey

Sergey (view profile)

on 19 Aug 2013

Try this

TREE = classregtree(...);
h = view(TREE);
saveas(h,'filename','png');

PS: all 'set' options for object h applies, so you can define image size, type etc... Hope it helps.

0 Comments

Sergey

Sergey (view profile)

Contact us