[AMPL 2934] I want to save my AMPL output as a matrix in a file

View: New views
3 Messages — Rating Filter:   Alert me  

[AMPL 2934] I want to save my AMPL output as a matrix in a file

by mkaspari :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hello AMPL gurus. I am having trouble. My AMPL program is outputting a
3 dimensional matrix. I want to be able to read the output in matlab.
So I am trying to create a file that has the AMPL output as a matrix.
I am looking at the printf command. Does anyone know a quick way of
doing this? Thank you for your time.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to ampl@...
To unsubscribe from this group, send email to ampl+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ampl?hl=en
-~----------~----~----~----~------~----~------~--~---


RE: [AMPL 2949] I want to save my AMPL output as a matrix in a file

by Robert Fourer-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


You can write a script that uses printf statements to create a text file in
just about any format you would like.  Matlab has an option for reading text
files into n-dimensional arrays.  So what you might need here is a Matlab
guru who knows the format for those text files.

Bob Fourer
4er@...


> -----Original Message-----
> From: ampl@... [mailto:ampl@...]
> On Behalf Of mkaspari [mkaspari@...]
> Sent: Thursday, October 29, 2009 1:08 PM
> To: AMPL Modeling Language
> Subject: [AMPL 2934] I want to save my AMPL output as a matrix in a file
>
>
> Hello AMPL gurus. I am having trouble. My AMPL program is outputting a
> 3 dimensional matrix. I want to be able to read the output in matlab.
> So I am trying to create a file that has the AMPL output as a matrix.
> I am looking at the printf command. Does anyone know a quick way of
> doing this? Thank you for your time.
>


--

You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to ampl@....
For more options, visit this group at http://groups.google.com/group/ampl?hl=en.



RE: [AMPL 2952] I want to save my AMPL output as a matrix in a file

by mkaspari :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you Robert. I am working on some trickery right now, when I figure it out I will post it in case someone else ever needs to do that.

The AMPL book you co authored is a great resource.

Thank You,
Matt Kaspari
President
Kaspo Inc
cell: 720.373.3920
fax: 303.255.1740
www.kaspoinc.com


-----Original Message-----
From: "Robert Fourer" <4er@...>
To: <ampl@...>, "'mkaspari'" <mkaspari@...>
Date: Mon, 2 Nov 2009 13:47:59 -0600
Subject: RE: [AMPL 2934] I want to save my AMPL output as a matrix in a file

>
> You can write a script that uses printf statements to create a text
> file in
> just about any format you would like.  Matlab has an option for reading
> text
> files into n-dimensional arrays.  So what you might need here is a
> Matlab
> guru who knows the format for those text files.
>
> Bob Fourer
> 4er@...
>
>
> > -----Original Message-----
> > From: ampl@... [mailto:ampl@...]
> > On Behalf Of mkaspari [mkaspari@...]
> > Sent: Thursday, October 29, 2009 1:08 PM
> > To: AMPL Modeling Language
> > Subject: [AMPL 2934] I want to save my AMPL output as a matrix in a
> file
> >
> >
> > Hello AMPL gurus. I am having trouble. My AMPL program is outputting
> a
> > 3 dimensional matrix. I want to be able to read the output in matlab.
> > So I am trying to create a file that has the AMPL output as a matrix.
> > I am looking at the printf command. Does anyone know a quick way of
> > doing this? Thank you for your time.
> >
>
>
>


--

You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to ampl@....
For more options, visit this group at http://groups.google.com/group/ampl?hl=en.