Export data to excel or text file directly

Hello,
As a result of below coding I get the file name "out".
Origin = (1:81)';
Destination = (1:81)';
Survey_Location = (1:246)';
[z,y,x] = ndgrid(Survey_Location,Destination,Origin);
out = [x(:),y(:),z(:)];
I can't copy the data, as it says data is too big to copy.
Kindly let me know how can I directly get the result or export this "out" file into Excel or txt file.
Thanks

댓글 수: 4

James Tursa
James Tursa 2014년 7월 6일
편집: James Tursa 2014년 7월 6일
Can't copy it where? The variables are not that big (13MB for x, y, z, and 37MB for out). What statement causes the error message? Can you post the exact error message you get? What do you get when you type the "memory" command?
Image Analyst
Image Analyst 2014년 7월 6일
편집: Image Analyst 2014년 7월 6일
Note: This should have been added to the original question at http://www.mathworks.com/matlabcentral/answers/140602-need-algorithm-to-create-the-list By the way, that code runs with no errors for me. Please post the exact error message - don't snip out just a small part of it but put ALL THE RED TEXT.
Fayyaz
Fayyaz 2014년 7월 6일
The order of the "out" matrix is 1614006*3. When I open it in Matlab work space window and click on copy, below message appears:
Too much data selected for copy. Try one or more of the following:
Export the data directly to file
Or select few data
Increase memory of Java.
So I was wondering if there is any method of directly getting the output in excel or txt file, it will be better.
Fayyaz
Fayyaz 2014년 7월 6일
@Image Analyst: There is NO problem in the code. It works perfect. The problem is I can't export the output to excel or txt, i.e. why I posted differently.

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

 채택된 답변

Image Analyst
Image Analyst 2014년 7월 6일

1 개 추천

Don't try to copy the data from the workspace. Maybe the clipboard is not big enough, though I think it should be. Try using a function to write it out, like xlswrite() or csvwrite().

추가 답변 (0개)

카테고리

질문:

2014년 7월 6일

답변:

2014년 7월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by