user3271929
user3271929

Reputation: 327

Converting data to Excel from Matlab

In matlab one of my variable produce a sort of number as follows: t =

1.0e-07 *

Columns 1 through 4

0.000002188044002 0.000011853757224 0.000043123777130 0.000134856642090

Columns 5 through 8

0.000414700915105 0.001479279377534 0.003134050793671 0.008617995925603

Columns 9 through 12

0.065830078792745 0.087987267599604 0.106338163623915 0.121617374878836

Columns 13 through 16

0.134520178924611 0.145518794399287 0.155035638788571 0.163042823513867

Columns 17 through 18

0.170181805020581 0.172442168463983

How I can produce them in one column in order to easily copy and paste to Excel?

Upvotes: 1

Views: 102

Answers (2)

andrelucas
andrelucas

Reputation: 688

Try using this:

fprintf ('%g\n', t);

Which won't have the leading spaces you get from format long g; t'

Upvotes: 0

Dan
Dan

Reputation: 45752

try

format long g
t'

or else just double click on t in your workspace and you'll get a datagrid (the variable editor) that you can just copy and paste out of

Upvotes: 1

Related Questions