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

Thread Subject:
Write to xlm file

Subject: Write to xlm file

From: iris

Date: 10 Jun, 2010 09:12:04

Message: 1 of 2

hii,
I try to write a word to xlm file with this code:

xlsfile = 'C:\shadow\eli project\imageStatistics.xls';
xlsLocation = sprintf('M%d', imageNum+1);
Lanswer = input('Curvature of the surface Curvature / Flat / Both ?', 's');
Manswer = input('Number of different surface ?');
answer = [Lanswer Manswer];
xlswrite(xlsfile, answer, 1, xlsLocation);

The result is one letter in every cell.

Subject: Write to xlm file

From: Sadik

Date: 10 Jun, 2010 11:58:04

Message: 2 of 2

Hi Iris,

You will need to convert it to a cell. Right before the xlswrite line, you could say:

answer = {answer};

I haven't tried but this should work.

Best.

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us