escolha_lista_curto_word = "Sample text"
ybarra_1 = magic(5);
word = actxserver('Word.Application');
word.Visible =1;
document=word.Documents.Add;
selection=word.Selection;
selection.Pagesetup.RightMargin=28.34646;
selection.Pagesetup.LeftMargin=28.34646;
selection.Pagesetup.TopMargin=28.34646;
selection.Pagesetup.BottomMargin=28.34646;
selection.Paragraphs.LineUnitAfter=0.01;
selection.TypeText(escolha_lista_curto_word);
selection.TypeParagraph;
selection.TypeParagraph;
selection.Font.Name='Consolas';
selection.Font.Size=9;
selection.TypeText('Y_barra(+) = ');
selection.Font.ColorIndex = 16;
str = sprintf('%d%c%d\n',size(ybarra_1,1),'x',size(ybarra_1,1));
selection.TypeText(str);
selection.Font.ColorIndex = 1;
selection.Font.Name='courier New';
selection.Font.Size=10;
str = sprintf([repmat('%6g',1,size(ybarra_1,2)) '\n'],ybarra_1);
selection.TypeText(str);
delete(word);