简体   繁体   English

从Matlab将数据转换为Excel

[英]Converting data to Excel from Matlab

In matlab one of my variable produce a sort of number as follows: t = 在matlab中,我的一个变量产生了如下的数字:t =

1.0e-07 * 1.0e-07 *

Columns 1 through 4 第1至4栏

0.000002188044002 0.000011853757224 0.000043123777130 0.000134856642090 0.000002188044002 0.000011853757224 0.000043123777130 0.000134856642090

Columns 5 through 8 第5至8栏

0.000414700915105 0.001479279377534 0.003134050793671 0.008617995925603 0.000414700915105 0.001479279377534 0.003134050793671 0.008617995925603

Columns 9 through 12 第9至12栏

0.065830078792745 0.087987267599604 0.106338163623915 0.121617374878836 0.065830078792745 0.087987267599604 0.106338163623915 0.121617374878836

Columns 13 through 16 第13至16列

0.134520178924611 0.145518794399287 0.155035638788571 0.163042823513867 0.134520178924611 0.145518794399287 0.155035638788571 0.163042823513867

Columns 17 through 18 第17至18栏

0.170181805020581 0.172442168463983 0.170181805020581 0.172442168463983

How I can produce them in one column in order to easily copy and paste to Excel? 我如何在一列中生成它们以便轻松复制并粘贴到Excel?

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 否则,只需双击工作空间中的t,您将获得一个数据网格(变量编辑器),您可以将其复制并粘贴到

Try using this: 尝试使用此:

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

Which won't have the leading spaces you get from format long g; t' format long g; t'不会得到前导空格format long g; t' format long g; t'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM