Passing values from an excel file to another using matlab

I have a matrix in excel with negative values. I want to create a new matrix in an excel file with the absolute values of the previews one. Can anyone share with me the matlab code in order to accomplish this ? Any help could be useful.Thanks in advance.

 採用された回答

Guillaume
Guillaume 2015 年 11 月 5 日

1 投票

writetable(varfun(@abs, readtable('inputfile.xlsx')), 'outputfile.xlsx')
may do what you want.

5 件のコメント

Konstantinos
Konstantinos 2015 年 11 月 5 日
could you please elaborate in "writetable" & "readtable" use ?
Konstantinos
Konstantinos 2015 年 11 月 5 日
Is it revelant to xlswrite & xlsread commands ?
Guillaume
Guillaume 2015 年 11 月 5 日
writetable and readtable have been part of matlab since R2013b.
They are much simpler to use than xlswrite and xlsread. Internally, they use these functions.
Image Analyst
Image Analyst 2015 年 11 月 5 日
What version do you have? I think readtable() came with R2013b or so. Can you attach your workbook?
Konstantinos
Konstantinos 2015 年 11 月 5 日
Thanks a lot! I was unaware of the existance of these two functions! I have R2013b edition. I will try this command and I will inform you if need be..

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by