The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Export variable to .txt
Replies: 1   Last Post: Oct 17, 2012 3:53 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 3
Registered: 9/27/12
Export variable to .txt
Posted: Oct 17, 2012 2:32 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I have some .xls files with 4 columns and more than 6,000 rows (numbers),that i need to import to matlab, then sort it rows...
Now I need to export this sorted variable to a .txt file
Take a look in my script

%% Import data
[~, ~, BCM2] = xlsread('path','filename','matrixrowsandcolumns');
BCM2(cellfun(@(x) ~isempty(x) && isnumeric(x) && isnan(x),BCM2)) = {''};

%% Data sort
BBCM2 = sortrows(BCM2);

%% Saving sorted Data to a text file

here is my problem, i need to generate a .txt file with this BBCM2 variable and I don't know how can i do that..

Please, any help will be welcome!


Date Subject Author
Read Export variable to .txt
Read Re: Export variable to .txt

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.