How to export the decimal and negative data to excel

3 次查看(过去 30 天)
clc
clear
hold all
% Plot cylinder
[X,Y,Z] = cylinder(5,100);
[TRI,v]= surf2patch(X,Y,Z);
patch('Vertices',v,'Faces',TRI,'facecolor',[1 1 0.5],'facealpha',0.5);
view(3);axis square; grid on; title('Enclosed Cylinder')
format long
xlswrite('myfile4.xlsx', X, ['A1:A'
num2str(length(X))]);
xlswrite('myfile4.xlsx', Y, ['B1:B' num2str(length(Y))]);
xlswrite('myfile4.xlsx', Z, ['C1:C' num2str(length(Z))]);
hold off
I get #N/A after third column .

采纳的回答

Walter Roberson
Walter Roberson 2017-1-29
I suggest you use
xlswrite('myfile4.xlsx', [X(:), Y(:), Z(:)]);
  2 个评论
Rohan Maharjajn
Rohan Maharjajn 2017-1-29
@Walter Roberson. Thank you.. That worked for me.. Now I having problem creating a loft from the points in CatiaV5. How to export those points to Catia and create a CAD drawing of those coordinates

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by