How to export the decimal and negative data to excel

조회 수: 3 (최근 30일)
Rohan Maharjajn
Rohan Maharjajn 2017년 1월 29일
댓글: Walter Roberson 2017년 1월 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
Walter Roberson
Walter Roberson 2017년 1월 30일
Communication with Catia is discussed in http://www.mathworks.com/matlabcentral/answers/15228-link-catia-to-matlab and a few other posts.

댓글을 달려면 로그인하십시오.

추가 답변 (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