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

Learn moreOpportunities for recent engineering grads.

Apply Today**New to MATLAB?**

Asked by som
on 8 Dec 2012

Hi all,

I've written a program with some outputs like 'a', 'b', 'c' which are seprated in different sheets of MATLAB.

To see the results in 'a', 'b', 'c',I have to click and open three times which is time-consuming.

How can I write some comands to put the results of 'a', 'b', 'c' beside each other.

I mean 'a', 'b', 'c' are presented in one table whit the heading of 'a', 'b', 'c' .

How can I write this program?

Thanks in advance.

*No products are associated with this question.*

Answer by Walter Roberson
on 8 Dec 2012

Accepted answer

If the outputs are the same size, then put them together in a cell array and xlswrite() the cell array. You might find num2cell() useful along the way.

## 6 Comments

## Azzi Abdelmalek

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/56064#comment_116041

what is 'a'?

## som

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/56064#comment_116055

as I showed a, b and c are three variabels which are outputs of a program .

## per isakson

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/56064#comment_116057

What meaning do you put in the word "sheet"?

## som

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/56064#comment_116066

I mean 'a', 'b', 'c' are presented in one table whit the heading of 'a', 'b', 'c' .

## Walter Roberson

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/56064#comment_116072

Do you mean uitable() in three different figures at present? Or do you mean you are outputting three different Excel files? Or do you mean you are outputting to three different "sheets" within one Excel file?

## som

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/56064#comment_116076

I mean " Or do you mean you are outputting to three different "sheets" within one Excel file?"