help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: FW: How to send (write) output to a file when running a script file


From: Astro Insight
Subject: RE: FW: How to send (write) output to a file when running a script file
Date: Wed, 14 Dec 2016 17:04:58 -0600

Thank you.  I will try this too.

-----Original Message-----
From: Adrian Barnes [mailto:address@hidden
Sent: Tuesday, December 13, 2016 10:54 PM
To: Doug Stewart; Astro Insight
Cc: Help GNU Octave
Subject: Re: FW: How to send (write) output to a file when running a script file

I would recommend looking up the 'diary' function.


For example:

clear all;diary 'script_output.txt';
% script content
diary off;

Regards,
Adrian



________________________________
From: Doug Stewart <address@hidden>
To: Astro Insight <address@hidden>
Cc: Help GNU Octave <address@hidden>
Sent: Wednesday, 14 December 2016, 12:18
Subject: Re: FW: How to send (write) output to a file when running a script    
file







On Tue, Dec 13, 2016 at 11:05 PM, Astro Insight <address@hidden> wrote:

Hello Doug,
>
>I don’t know if it’s appropriate to directly ask you this question.   If not, 
>please let me know and I will go through address@hidden  Because last time you 
>helped me, I’m asking you this question.
>
>When I ran my script file, it spits out everything (files read, and outputs) 
>on the screen.

You had:
[xopt, fmin, status, extra] = glpk(C, A, B, LB, UB, ctype, vartype, s, param)

If you change it to:
[xopt, fmin, status, extra] = glpk(C, A, B, LB, UB, ctype, vartype, s, param);


see the end   ;

This stops it from printing to the screen!!

Put a semicolon at the end of each line.

Is that what you want?



I wonder if I can run the script file in a function or a program.  If so is 
there’s a template or an example I could use where the details of compilation 
and execution steps are described in details.
>
>Thanks in advance.
>
>Jagdish
>
>
>Jagdish C Maheshri, Ph.D.
>Astro Insight
>www.astroinsight.com
>281-238-8992
>832-368-8702
>
>
>
>From:Astro Insight [mailto:jmaheshri@ astroinsight.com]
>Sent: Friday, December 09, 2016 10:06 PM
>To: 'Doug Stewart'
>Cc: 'Help GNU Octave'
>Subject: RE: How to send (write) output to a file when running a script file
>
>It worked!!!
>
>Thank you so much.
>
>Jagdish
>
>
>
>From:Doug Stewart [mailto:address@hidden
>Sent: Friday, December 09, 2016 9:20 PM
>To: Astro Insight
>Cc: Help GNU Octave
>Subject: Re: How to send (write) output to a file when running a script file
>
>
>
>On Fri, Dec 9, 2016 at 9:13 PM, Astro Insight <address@hidden> wrote:
>Hello,
>
>I have recently downloaded and installed Octave software.  I’m trying to solve 
>a 1700 X 880 linear programming optimization problem.  I have a created a 
>script file and I want direct the results of the program (output from the 
>pkg---optim to a file.  Apparently the glpk function (as below)spits out the 
>results to the screen, and I don’t know how to direct the results to a file.
>
>[xopt, fmin, status, extra] = glpk(C, A, B, LB, UB, ctype, vartype, s, param)
>
>save data.txt  xopt  fmin status extra
>
>Try that!
>
>
>
>>I would very much appreciate your help on this.
>>
>>Another thing which is not as important is:  Would like to know how to 
>>convert the script file to a function or equivalent so that I can directly 
>>run the function.
>>
>>If you would like me to submit my script file, please let me know.
>>
>>Thank you,
>>Jagdish
>>
>>
>>Jagdish C Maheshri, Ph.D.
>>www.astroinsight.com
>>281-238-8992
>>832-368-8702
>>
>>
>> Virus-free. www.avast.com
>>
>>______________________________ _________________
>>Help-octave mailing list
>>address@hidden
>>https://lists.gnu.org/mailman/ listinfo/help-octave
>
>
>
>
>--
>DAS
>
>
>
> Virus-free. www.avast.com



--

DAS


_______________________________________________
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus




reply via email to

[Prev in Thread] Current Thread [Next in Thread]