フィルターのクリア

How to import data from MATLAB into Excel, and then have Excel save the data

53 ビュー (過去 30 日間)
Tania
Tania 2015 年 2 月 12 日
コメント済み: Image Analyst 2023 年 1 月 1 日
Hi everyone,
I have extracted some features from images and they can be seen in the command window. There are too many blob information which needs to be saved in excel file from MATLAB command window.
Could anyone please help me how to save them in a excel file or text file automatically so that it can be used later on rather than running the process to see the values over and over unless I save them manually by copying and pasting them in text file / excel file.
Any help will be appreciated.

回答 (3 件)

Julia
Julia 2015 年 2 月 12 日
Hi,
there exists the command
xlswrite()
Does this suit your purpose?
  4 件のコメント
Tania
Tania 2015 年 2 月 13 日
Hi Vito,
Thank you for your suggestion but I am not sure how to do that.
If you do have any written program available as Image Analyst have given in his post, could you please give me like that.
Thanks
Vito
Vito 2015 年 2 月 15 日
The images do not, but the problem is clear. Excel is not suitable. As an example, monitoring Facebook.
% insert data
exdata = []; % dataset
.....
conn = database('facebook', '', '');
colnames = {'a', 'd'}
fastinsert(conn, 'RELATION', colnames, exdata)
......................
% get data
conn = database('facebook', '', '');
curs = exec(conn,['SELECT * From RELATION']);
curs=fetch(curs);
Set=curs.Data;
Create your database and get or set data.

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


Image Analyst
Image Analyst 2015 年 2 月 12 日
編集済み: Image Analyst 2015 年 2 月 12 日
See my Excel demo. It uses ActiveX and will be a lot faster than xlswrite if you need to make multiple writes.
Another option is you could put your data into a table (if you have R2013b or later) and then call writetable().
  10 件のコメント
bim
bim 2023 年 1 月 1 日
@Image Analyst: I packed the functionality for reading in a simple static class so it can be easily reused.
It will only read contiguous tables and for now only reads tables with columns with a single digit name (A-Z).
I have not benchmarked it against importdata yet.
Image Analyst
Image Analyst 2023 年 1 月 1 日
OK, that's good. I also have a static class with a ton of functions for doing stuff in Excel, like formatting cells, etc. It's attached.

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


Md Iqbal
Md Iqbal 2020 年 10 月 16 日
How to save data from matlab GUI edit text box to excel
  1 件のコメント
Image Analyst
Image Analyst 2020 年 10 月 16 日
From GUIDE, App Designer, or inputdlg()?
Have you tried writematrix() or writecell()?

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

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by