Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Converting an excel file to a .pat file

164 views
Skip to first unread message

Charles Chilaka

unread,
Jan 6, 2015, 9:52:17 AM1/6/15
to
How can I convert an excel(.xls)file to a pattern(,pat) file in Matlab so that I can save the output as a pattern(.pat) file and be able to use the Stuttgart Neural Network Simulator to work on the pattern file created.
Thanks

dpb

unread,
Jan 6, 2015, 4:27:02 PM1/6/15
to
That all depends on what the output file format actually is...you can
read a file with xlsread() and write whatever you want.

Specifics out need specifics in...

--

Charles Chilaka

unread,
Jan 7, 2015, 8:09:13 AM1/7/15
to
"dpb" wrote in message <m8hju3$slk$1...@dont-email.me>...
I want the output to be a .pat file ie. If I had an abc.xls, I want to convert it to abc.pat, using maybe Matlab. I have tried using xls2nns but that is not working

dpb

unread,
Jan 7, 2015, 9:32:04 AM1/7/15
to
That simply repeats what you said before...I have no idea what an actual
".pat file" format is; you mention some other toolset that uses it. The
supplier/vendor/author of that tool is the place to go to ask.

If you can find what the format/structure of the file is, yes you can
write a code function in Matlab to produce one given the input file but
the key is "what is the file structure?".

--

dpb

unread,
Jan 7, 2015, 3:21:49 PM1/7/15
to
On 01/07/2015 8:31 AM, dpb wrote:
...

> If you can find what the format/structure of the file is, yes you can
> write a code function in Matlab to produce one given the input file but
> the key is "what is the file structure?".

It looks like there are a couple of choices but the simple-minded looks
pretty simple from an example demo I found --

They give an example that looks like it's simply a text file with a few
header lines that give dimensions

No. of patterns : N
No. of input units : I
No. of output units : O

# Input pattern 1:
data
# Output pattern 1:
outputs
...

The # are comment indicators so don't even need those.

There was a version and timestamp couple of lines shown; not sure
whether they're needed or not; I'd guess not in all likelihood.

Show a short sample of your data file and undoubtedly can convert to the
above quite readily. Shouldn't take but a few lines of code for the
simple case as above.

If your problem were to require a variable-format file I saw something
about in the SNNS documentation, that is a fair amount more complex it
appears. Still surely doable but you'd have to spend some time
deciphering the reference material to code it in its full glory.

--
0 new messages