How Convert TXT data format to MAT data format

I have a EEG's data in txt format..
but now, i want to convert it to mat data format
can i do that?

this is because of Matlab can read more faster if the data i convert to MAT data format
2
Putrisia
8/5/2010 3:26:04 AM
comp.soft-sys.matlab 207313 articles. 1 followers. lunamoonmoon (258) is leader. Post Follow

10 Replies
2468 Views

Similar Articles

[PageSpeed] 12
Putrisia Hendra wrote:
> I have a EEG's data in txt format..
> but now, i want to convert it to mat data format
> can i do that?
> 
> this is because of Matlab can read more faster if the data i convert to 
> MAT data format

Although it would be theoretically possible to do the conversion outside 
of matlab, the amount of time it would take to write and debug the 
appropriate program would be completely unproductive. Just enter matlab 
and load the file; if you will need to load it again another time then 
it might be worth saving the contents as a MAT file.
0
Walter
8/5/2010 4:29:23 AM
On Thursday, August 5, 2010 6:26:04 AM UTC+3, Putrisia Hendra  wrote:
> I have a EEG's data in txt format..
> but now, i want to convert it to mat data format
> can i do that?
> 
> this is because of Matlab can read more faster if the data i convert to MAT data format

0
12/10/2012 9:01:38 AM
hello Putrisia.

Im having the same problem.but im not convert the eeg text file to mat file.

how did you convert this?

I hope,you help me.Thank you so much.
0
gorkemsvs (4)
12/26/2012 1:19:48 AM
I am trying to save .mat format.
But matlab have an error.
"Error using load
Unable to read MAT-file myeegdata.mat: not a binary
MAT-file.
Try LOAD -ASCII to read as text."

can u help me?
thank you.
0
gorkemsvs (4)
12/26/2012 1:29:33 AM
On 12/25/2012 7:29 PM, gorkemsvs@gmail.com wrote:
> I am trying to save .mat format.
> But matlab have an error.
> "Error using load
> Unable to read MAT-file myeegdata.mat: not a binary
> MAT-file.
> Try LOAD -ASCII to read as text."
>

Well, clearly it isn't a recognizable .mat file.

Did you try Matlab's suggestion?

Was the file written from Matlab or is it just a stream file or some 
other format from some other source?

--

0
none1568 (7454)
12/26/2012 1:47:15 AM
> Well, clearly it isn't a recognizable .mat file.
> 
> 
> 
> Did you try Matlab's suggestion?
> 
> 
> 
> Was the file written from Matlab or is it just a stream file or some 
> 
> other format from some other source?



My file is a text file.I opened the text file with matlab an i saved the file .mat format.But then i didn't open the .mat file in matlab.
My file contains numeric data.I guess I was an error saving the file.

sorry for my english thank you
0
gorkemsvs (4)
12/26/2012 5:22:08 AM
On Wednesday, December 26, 2012 6:22:08 PM UTC+13, gork...@gmail.com wrote:
> > Well, clearly it isn't a recognizable .mat file.
> 
> > 
> 
> > 
> 
> > 
> 
> > Did you try Matlab's suggestion?
> 
> > 
> 
> > 
> 
> > 
> 
> > Was the file written from Matlab or is it just a stream file or some 
> 
> > 
> 
> > other format from some other source?
> 
> 
> 
> 
> 
> 
> 
> My file is a text file.I opened the text file with matlab an i saved the file .mat format.But then i didn't open the .mat file in matlab.
> 
> My file contains numeric data.I guess I was an error saving the file.
> 
> 
> 
> sorry for my english thank you

What do you mean when you say "I opened the text file..."?
Do you mean:
fid=fopen('myfile.txt','rt'):
If so, what did you do then?

Before you can save the data to a .mat file, you must read them into Matlab using something like textscan.
Then you can write them off to a .mat file using save.
0
mulgor (3009)
12/26/2012 8:00:25 PM
Thanks for helping.



 fid =3D fopen('mydata.txt');
            C =3D textscan(fid, '%s%s%f32%d8%u%f%f%s%f');
            fclose(fid);


the code ,that you gave me which was wroten at the top of this sentence,is =
only used for matrixes which columns and lines are specific. but I have a l=
ot of matrixes which have different numbers of columns and lines in my text=
scan. So I need a code which can sense all different types of matrixes auto=
matic.

Thank you for all helping.

0
gorkemsvs (4)
12/26/2012 10:20:43 PM
On 12/26/2012 4:20 PM, gorkemsvs@gmail.com wrote:
....

>              C = textscan(fid, '%s%s%f32%d8%u%f%f%s%f');
....

>
> the code ,that you gave me which was wroten [written] ...
> ... I have a lot of matrixes which have different numbers of
> columns and lines in my textscan. So I need a code which can sense all
> different types of matrixes automatic.
....

No can do if it's arbitrary unless you have additional 
information--either a header record in the file that identifies the file 
structure that can then be used or read a line and identify fields on a 
field-by-field basis before reading the rest of the file.

There's no magic elixir, sorry...

--
0
none1568 (7454)
12/26/2012 10:53:15 PM
yes you can..

try this

s=fopen('file_nam.tax','r');
val=fscanf(s,'%f');
fclose(s);
save('mat_file_nam.mat','val');
0
2011eec11
10/25/2014 5:55:44 PM
Reply:
Similar Artilces:

How do you mesh a test data set to plot a quiver graph?
I have a test data set for "x,y, angle, magnitude". I understand how to mesh "x" and "y" but I can't figure out how to mesh "angle" and "magnitude" to a quiver graph. Any hints, help are greatly appreciated. x, y, Angle, Magnitude 0, 0, -90, 0.2 0.5, 0, -89, 0.3 1, 0, -85, 0.7 1.5, 0, -60, 0.1 2, 0, -47, 0.1 0, 0.5, -20, 0.6 0.5, 0.5, -40, 0.8 1, 0.5, -50, 0.8 1.5, 0.5, -55, 0.7 2, 0.5, -90, 0.7 0, 1.5, -90, 0.1 0.5, 1.5, -90, 0.0 1, 1.5, -90, 0.1 1.5, 1.5, -90, 0.1 2, 1.5, -90, 0.2 0, 2, -83, 0.4 0.5, 2, -55, 0.6 1, 2, -62, 0.8 1.5,...

How to convert xls2pdf How to convert xls2txt
a. Where would there be a converter by email for xls2pdf ..xls to .pdf b. or a coverter by email for xls2txt ..xls to text c. where you send the .xls attachment by email and get the conversion by email d. or even preferable you can send the .xls attachment by email and read it at a web link. Hi Don Don Saklad wrote: > a. > Where would there be a converter by email for > xls2pdf > .xls to .pdf > > b. > or a coverter by email for > xls2txt > .xls to text There are others a lot more prone to answer this one, but: XLS, as I understand it, really IS text, so mayb...

Averaging Time series data #3
Hi there, need help figuring out a way to average data(ie temp) for a day. For example need to average 20,21 and 22nd day. yyy mo dd hh mm ss matlab date lat lon temp con sal chl-a 2004 12 20 20 58 07 732301.87370 49.21202 -123.84670 8.269 2.878 26.928 1.0 2004 12 20 20 58 37 732301.87405 49.21287 -123.84289 8.259 2.876 26.917 1.0 2004 12 20 20 59 07 732301.87439 49.21370 -123.83906 8.247 2.873 26.900 1.0 2004 12 20 20 59 38 732301.87474 49.21452 -123.83520 8.229 2.869 26.873 1.0 2004 12 21 21 00 08 732301.87509 49.21529 -123.83132 8.211 2.864 26.83...

using python to post data to a form
Hello: I have some data that needs to be fed through a html form to get validated and processed and the like. How can I use python to send data through that form, given a specific url? the form says it uses post, but I"m not really sure what the difference is. would it just be: http://mysite.com/bla.php?foo=bar&bar=foo? If so, how do I do that with python? -- Thanks, Ty ...

Convert xml to xls?
Hi all, does anyone know about an open-source tool or method that can convert a certain xml file to a spreadsheet (e.g. xls)? Can one import xml data in the OpenOffice program Calc? The problem is that the original xml file can be very long and the digit precision of some data fields is strictly required. Thanks a lot! Jie On Oct 21, 3:16=A0pm, Jie <Jie....@gmail.com> wrote: > Hi all, > > does anyone know about an open-source tool or method that can convert > a certain xml file to a spreadsheet (e.g. xls)? Can one import xml > data in the OpenOffice program Calc? The p...

I need a good sas dataset to html converter
I need a good sas dataset to html converter. Does anyone have any links to code that can do this? ...

convert m-file to simulink
How can I convert m-file which consist of ANN(Artificial Neural Network) to simulink block for simulation? Please do reply as soon as possible. Hi, you can use your m-file in Simulink with the user-defined functions. There is a Block matlab-fcn there. Inputs can be taken from source blocks, outputs can be visualized in sinks, as e.g. scopes. regards badariah mahbob wrote: > > > How can I convert m-file which consist of ANN(Artificial Neural > Network) to simulink block for simulation? > > Please do reply as soon as possible. "badariah mahbob" <bardzcomel@...

Convert Current Time to Dec
Sorry, This should be simple, but brain is hurting... How do I convert a Current Time to a Decimal 6,0 (HMS)? There must be a cleaner way then this: Insert into Table Values Dec( Substr(Char(CURRENT TIMESTAMP),12,2) || Substr(Char(CURRENT TIMESTAMP),15,2) || Substr(Char(CURRENT TIMESTAMP),18,2) ,6,0) TIA, Chris Take a peak at HOUR(), MINUTE(), and SECOND(). DEC() can also be used directly on the timestamp. integer(dec(current timestamp) - dec(current date) * 1000000) or round(dec(current timestamp) - dec(current date) * 1000000, 0) Simply use ...

converting cd server into file server
I have a procom CDT-21 21 bay scsi cd tower. I would like to change it into a file server by removing the scsi cd drives an replacing them with scsi hard drives. can this be done? I already have 14 scsi hard drives laying around and also have server 2000 os to put on it. any answers would help. thanks, Dweb ...

Refering to Data binding
I'm tring to do some mass insertion, so i'm using data binding, now the question is that i have (for the moment) a some field that will get the same value. is there a way to make it while on prepare? So that i only pass one value to the execute?? Thanks. One more thing... could i prepare a group of insertions together? Like: "INSERT INTO theTable (field1, field2, field3....) VALUES (?, ?, ?, ...); INSERT INTO theSubTable(fieldA, fieldB, fieldC,...) VALUES (?, ?, ?, ...);" This is a multi-part message in MIME fo...

Re: data step #21
Or even rolled up as proc sql; create table summary as select id, sum(min(endate,studydate + (4*365.25)) - begindat) as training_days from sample group by id order by id ; quit; Because the window is exactly four years, there is not the usual Leap Day problem. On Wed, 8 Jun 2005 13:48:30 -0700, Terjeson, Mark (IM&R) <Mterjeson@RUSSELL.COM> wrote: >Hi Gang, > >Here might be one method. > > >data sample; > input id $2. > +1 begindat da...

From numeric SAS date to YYYYMMDD format
Hi all, I'm trying to merge two files by date of birth, but they are not alike.. In one file it's a numeric SAS date (as I understand it, number of days since 1.1.1960!?) and in the ohter it's a character variable in the format YYYYMMDD Hope, that someone could tell me how to transform the numeric variable to be like the other... Thank you, Lene "Lene Blenstrup" <lenetb@SOCSCI.AAU.DK> skrev i meddelelsen news:200712200913.lBK1419B003400@mailgw.cc.uga.edu... > > In one file it's a numeric SAS date (as I understand it, number of days > since 1.1.19...

VBA for batch convert e00
Any one had made a vba program which using for convert e00 to shp? because I have a lot of e00 files it need to convert to shp and then open by arcmap! Eric Hi Eric, > Any one had made a vba program which using for convert e00 to shp? because I > have a lot of e00 files it need to convert to shp and then open by arcmap! If you don't mind using a 3rd party product, our FME can do this in a number of ways. You could just use our "batch translate" option and a couple of clicks later you'll have everything in shape files (or even personal geodatabase...

i960 data cache errata
http://www.radisys.com/service_support/artic-permission/960cache.dbm Initially, the ARTIC960 kernel enabled the instruction cache on both the CA and CF processors, but it left the data cache disabled on the CF based adapters. The June, 1996 release(1) (or later) of the ARTIC960 firmware changes this by offering options to enable and control use of the 80960 CF data cache. (2) To determine if an ARTIC960 MCA adapter has the data cache engineering change, the status utility (ricstat) can be used to display the configuration of the adapter. -- Reply to me at louis little punct...

[Info-Ingres] views and E_US100F String cannot be converted to numeric
--_000_57765A44B573A747BAEC13DBB1E209AD049F66BEEXCH1ctsuoxacuk_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-WatchGuard-AntiVirus: part scanned. clean action=allow Hi All, I have a distributed database which has a native view (named all_box_store)= which is a select with many union all's of several registered tables. If I run the query... select * from c_slot_allocation a where a.box_cid not in ( select s.box_cid from all_box_store s where a.project_cid =3D s.project_cid and a.rack_cid =3D s.rack_cid and a.slot_p...

Copy objects Wizard
I have not used the copy objects wizard that much. I used it today to copy 4 views from my dev box to production. It copied the views, but also wiped out my data in all the tables that the views are built around!!! In production!!!! Can someone provide me some insight into why this happened? Thanks, Chad Chad Richardson (chad@NIXSPAM_chadrichardson.com) writes: > I have not used the copy objects wizard that much. I used it today to > copy 4 views from my dev box to production. It copied the views, but > also wiped out my data in all the tables that the views are built > ar...

converting HH:MM to a decimal
I have 3 pairs of time in/out (24 our clock) that I need to calculate the decimal equivalent of the total time worked for that day. example: time in/out 08:00 10:00, 10:15 12:45, 13:45 16:50 if I use a simple select of time_out �time_ in I get 2:00, 2:30, 3:10 respectfully, or 7:35 total hours. That is 7.58 in decimal. Now how do I change the total hours of 7:35 to a decimal of 7.58 in a single SQL statement? Or will I have to write a proc that does this? ...

how to edit data of a particular column in MSFlex Grid
Hi All, how do i edit data of a particular column in MSFlex Grid? i know i can do it with text box but was wondering if i will be able to edit data in a specific column... Please do help. Thanks Anu > how do i edit data of a particular column in MSFlex Grid? i know i can > do it with text box but was wondering if i will be able to edit data in > a specific column... I am not sure what you mean when you say "edit data of a particular column"... do you mean individual cells in a column or something common to all of the cells in a column? If you could give us an example of...

date format dd-MMM-yyyy
Does anybody have any idea about the date format dd-MMM-yyyy(e.g., 26- JUN-2009) in SAS? Thanks in advance. Shashi ...

convert list of strings to set of regexes; convert list of strings to trie
Hello, I need a function that converts a list into a set of regexes. Like so: string_list = ["blaa", "blab", "raaa", "rabb"] print string_list2regexes(string_list) This should return something like: ["bla(a|b)", "ra(aa|bb)"] I am aware of the fact that converting the list to a *trie* would almost do the job. But I couldn't find anything about Python modules that produce tries. Are there any modules that I could use? Or do I have to implement it myself? Klaus [Klaus Neuner] > I need a function that converts a li...

"cannot convert from the charset" error message
wx 2.5.5, Gtk2, unicode, static lib, suse 9.3 when I run my application I get the a dialog box with the following message : "cannot convert from the charset '@LOCALE, UTF-8, ISO-8859-15, CP-1252!" Except this dialog box my program seems to work fine looking through the wx source code I seem to find this error inside *wxCSConv::DoCreate() function (file common/strconv.cpp) anyone experienced this error message before ? any quick fixes on linux besides turning off the logging with wxNullLog ? Any idea why exactly do I get the message ? Thanks, Andrei On ...

Re: How to write binary data to standard out?
Rob Warnock wrote: > Plain ol' MAP should also work: > > > (map 'vector 'char-code "Hello World!") > > #(72 101 108 108 111 32 87 111 114 108 100 33) Clojure: user=> (mapv int "hello") [104 101 108 108 111] ...

Re: help on data step #2
Olivesecret, You could create a new variable LETTER by using the SUBSTRING and LENGTH functions - which would have a value of the last character in the character string (called ID in the example below). letter = substr(id,length(id)); Tell more about what the final goals are, because BY group processing may be a better idea than actually splitting the original data set. Jack Jack Clark Senior Research Analyst phone: 410-455-6256 fax: 410-455-6850 jclark@hilltop.umbc.edu University of Maryland, Baltimore County Sondheim Hall, 3rd Floor 1000 Hilltop Circle Baltimore, MD 21250 Con...

apps: 4 Millions Domains data with Category
Successfull Internet and Direct Marketing products on www.promotionsite.net * NEW * DOMUS Domains Toolkit Fall 2004 - Unique on the Net 4 Millions "Whois" Domains data with Expiration Date and Category*. Ultimate Version (October 2004) - Our best rate starts from US *$149*. A wonderful tool for Internet and Direct Marketing. Available in Basic, Advanced and Full Editions. It contains a domain database with 4 millions *FRESH* October 2004 New records .com, .net, .org. 4 Gigabytes MS Excel data zipped on CD-Roms/Dvd. Compression 3:1. MS Excel or ...

Merits of Including Inputs Missing Older Data
This is a general question, consider, the general case of predicting the stock market. You have inputs ranging from stock price to fundamentals to indicators. These inputs might go back in time, say 20 years. The problem is that there is an input that is expected to be extremely desirable, however, it only goes back in time 10 years - this input simply does not exist for the time period back 11-20 years. My thinking is that since its value would be zero for 11-20 years back, it might not be such a bad thing when training the net since it simply would have no effect on the output. In fact,...