How to copy content of of 7*14 matrix file(*.mat) to a table on Microsoft Word??

Réponses (2)

If you're using Windows, you have to use ActiveX to have MATLAB directly control Word. I'm attaching a program to use it with Excel, but you can search the forum to see if anyone has used it with Word.

5 commentaires

I will try it.
Another question: I used
format bank
to display only two digits after comma BUT still all the numeric values in *.mat variables look like this value:
0.943636363636364
The format commands only change how MATLAB is displaying the values to your MATLAB command window, however they are still stored in memory as double precision. You can convert them to char arrays with the rounding performed and place these into a Word Cell.
a = 0.943636363636364;
num2str(a,'%0.2f')
ans =
0.94
How can I convert all the values(14*7)and (14*29)??
Mr. Image Analtst, it didn't work.
how to make the *. mat variable values in appear in two digits after comma??
Appear where? If you used format bank and just left off the semicolon, the number should echo to the command window with only two numbers to the right of the decimal point. What did you do (apparently it wasn't this)?

Connectez-vous pour commenter.

1 commentaire

it gave the following error
Error using Interface.00020975_0000_0000_C000_000000000046/set
Invoke Error, Dispatch Exception:
Source: Microsoft Word
Description: Åä ÇáÚäÕÑ Ðæ ÇáÇÓã ÇáãÍÏÏ ÛíÑ ãæÌæÏ.þ
Help File: wdmain11.chm
Help Context ID: 62e2
Error in table2word (line 157)
else set(Doc.Selection,'Style','Table Normal'); end

Connectez-vous pour commenter.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by