Show output variables in a table

Hi guys!
I am sorry for the trivial question, but I have not found any answer in the web.
I am analysing a lot of financial data, I computed turning points and the amplitude and duration of them. Now I would like to show this results in a nice way, like a table with the data and the values of the turning points but I found it more difficult than I thought.
Until now I just built a "cell" array with the dates on the first column and the values on the second. I know this is not the most efficient and nice way, but was the only solution I found to have the dates and values side by side.
May you please suggest me something better?
Thanks Gaia

 採用された回答

Walter Roberson
Walter Roberson 2011 年 6 月 28 日

0 投票

Sounds like a job for uitable()

その他の回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2011 年 6 月 28 日

0 投票

Or do you mean saving you data to an Excel spread sheet? Please note that uitable() recommended by Walter is available in later version of MATLAB. I know it works in 2010b. It is "un-documented" in 2007b.
This code might give you some idea.
Value=[1:3]';
Dates=cellstr(datestr(Value+now));
CellData=[Dates cellstr(num2str(Value))];
h=uitable('Data',CellData);
xlswrite('test.xls',CellData)
Then open 'test.xls' in your MATLAB current folder.

1 件のコメント

gaia buratti
gaia buratti 2011 年 6 月 28 日
It looks like working like that, and is easy, thanks a lot!!!

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeTables についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by