matlab数据输出问题。

15 ビュー (過去 30 日間)
yxyqucgs
yxyqucgs 2023 年 5 月 25 日
回答済み: qunbaer 2023 年 5 月 25 日
请问如何把数组输出到一个dat文件呢,要求是输出文件能在origin软件中正常打开
我的代码如下。我用save语句输出的文件中,数据是e指数类型,在origin中打不开,怎样能把数据输出为小数类型呢?
x = 1:1:40;
y = 184.001:0.001:187;
z0 = sca1;
z = reshape(z0,[3000,40]);
%zz = reshape(z,[],1);
%save zz.txt zz -ascii;
% mesh(x,y,z);
% view(0,90);
y1 = 184.001:0.0001:187;
x1 = [1:0.1:40]';
z1 = interp2(x,y,z,x1,y1,'linear');
% mesh(x1,y1,z1);
% view(0,90);
zz1 = reshape(z1,[],1);
save zz1.txt zz1 -ascii;

採用された回答

qunbaer
qunbaer 2023 年 5 月 25 日
save格式选择double,不要ascii

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange曲面图和网格图 についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!