Thursday, July 26, 2012

writing strings in excel by MATLAB

Hey guys,


When you want to write some value in an excel file from MATLAB, you can use:

my_string = 'test';
xlswrite('my_excel.xls', {my_string}, 'my_page', 'A1');

where,
my_excel.xls: file I need to write
{my_string}: the content
{} of my_string makes sure the whole string is written in one cell.
my_page: the page of the escel file
A1: the cell

No comments:

Post a Comment