Hi all,
Suppose you have written a program A.m, and you want to print it out.
Inside A.m you used functions that you've previousy written, say B.m, C.m,
D.m.
And inside each of these subroutines you have other subroutines called E.m,
F.m, G.m, etc...
And there are many of these programs.
You'd like to print them all out.
Is there a way this can be done automatically and in a batch mode?
Currently for hundreds of such programs, I have to open each program one by
one and then click to print each one by one... very time consuming...
Thanks!
|
|
0
|
|
|
|
Reply
|
housing2006 (283)
|
4/21/2007 9:20:10 PM |
|
> Currently for hundreds of such programs, I have to open each program one by
> one and then click to print each one by one... very time consuming...
Remember, these are simple text files. You don't have to open them
using the matlab editor. Use any editors you like.
If you're in linux, you can simply concatenate them together using the
'cat' command. If you're not in linux, I suggest learning the Perl
language (even if you are in linux, I suggest this). Perl can help
you deal with multiple text files in intelligent ways. It's not easy
to learn though, but the initial time invested is so much worth it in
the long run. I've probably saved hundreds of hours alone by using
perl for various tasks such as what you describe.
In general a logical approach would be to order the filenames in order
of appearance within the code.
If A.m calls A1.m and A2.m, and A1.m calls A1a.m and A1b.m, you'd
have
A.m
A1.m
A1a.m
A1b.m
A2.m
B.m
....
then concatenate these together, convert to postscript or pdf (linux:
man enscript, windows: MS Word/Open office Writer), then print.
|
|
0
|
|
|
|
Reply
|
jbenjam (67)
|
4/22/2007 9:36:42 AM
|
|
"Ben" <jbenjam@gmail.com> wrote in message
news:1177234602.385073.230950@n59g2000hsh.googlegroups.com...
>
>> Currently for hundreds of such programs, I have to open each program one
>> by
>> one and then click to print each one by one... very time consuming...
>
> Remember, these are simple text files. You don't have to open them
> using the matlab editor. Use any editors you like.
>
> If you're in linux, you can simply concatenate them together using the
> 'cat' command. If you're not in linux, I suggest learning the Perl
> language (even if you are in linux, I suggest this). Perl can help
> you deal with multiple text files in intelligent ways. It's not easy
> to learn though, but the initial time invested is so much worth it in
> the long run. I've probably saved hundreds of hours alone by using
> perl for various tasks such as what you describe.
>
> In general a logical approach would be to order the filenames in order
> of appearance within the code.
> If A.m calls A1.m and A2.m, and A1.m calls A1a.m and A1b.m, you'd
> have
>
> A.m
> A1.m
> A1a.m
> A1b.m
> A2.m
> B.m
> ...
> then concatenate these together, convert to postscript or pdf (linux:
> man enscript, windows: MS Word/Open office Writer), then print.
>
Okay, perhaps an easier way is to find all the Matlab files under one
directory and print them out...
(since when I develop programs, I put them all under local directory...)
How to do that?
|
|
0
|
|
|
|
Reply
|
housing2006 (283)
|
4/22/2007 5:34:52 PM
|
|
Mike wrote:
> "Ben" <jbenjam@gmail.com> wrote in message
> news:1177234602.385073.230950@n59g2000hsh.googlegroups.com...
>>> Currently for hundreds of such programs, I have to open each program one
>>> by
>>> one and then click to print each one by one... very time consuming...
>> Remember, these are simple text files. You don't have to open them
>> using the matlab editor. Use any editors you like.
>>
>> If you're in linux, you can simply concatenate them together using the
>> 'cat' command. If you're not in linux, I suggest learning the Perl
>> language (even if you are in linux, I suggest this). Perl can help
>> you deal with multiple text files in intelligent ways. It's not easy
>> to learn though, but the initial time invested is so much worth it in
>> the long run. I've probably saved hundreds of hours alone by using
>> perl for various tasks such as what you describe.
>>
>> In general a logical approach would be to order the filenames in order
>> of appearance within the code.
>> If A.m calls A1.m and A2.m, and A1.m calls A1a.m and A1b.m, you'd
>> have
>>
>> A.m
>> A1.m
>> A1a.m
>> A1b.m
>> A2.m
>> B.m
>> ...
>> then concatenate these together, convert to postscript or pdf (linux:
>> man enscript, windows: MS Word/Open office Writer), then print.
>>
>
> Okay, perhaps an easier way is to find all the Matlab files under one
> directory and print them out...
>
> (since when I develop programs, I put them all under local directory...)
>
> How to do that?
>
>
on linux there exists the very useful program enscript. it also does
code highlighting (however, i do not know in the case of matlab) and
very nice things, such as borders and headings, multicolumn, ...
michael
|
|
0
|
|
|
|
Reply
|
themiwi.REMOVE.THIS (862)
|
4/22/2007 5:51:32 PM
|
|
"Michael Wild" <themiwi.REMOVE.THIS@student.ethz.ch> wrote in message
news:462ba0a3$1@news1.ethz.ch...
> Mike wrote:
>> "Ben" <jbenjam@gmail.com> wrote in message
>> news:1177234602.385073.230950@n59g2000hsh.googlegroups.com...
>>>> Currently for hundreds of such programs, I have to open each program
>>>> one by
>>>> one and then click to print each one by one... very time consuming...
>>> Remember, these are simple text files. You don't have to open them
>>> using the matlab editor. Use any editors you like.
>>>
>>> If you're in linux, you can simply concatenate them together using the
>>> 'cat' command. If you're not in linux, I suggest learning the Perl
>>> language (even if you are in linux, I suggest this). Perl can help
>>> you deal with multiple text files in intelligent ways. It's not easy
>>> to learn though, but the initial time invested is so much worth it in
>>> the long run. I've probably saved hundreds of hours alone by using
>>> perl for various tasks such as what you describe.
>>>
>>> In general a logical approach would be to order the filenames in order
>>> of appearance within the code.
>>> If A.m calls A1.m and A2.m, and A1.m calls A1a.m and A1b.m, you'd
>>> have
>>>
>>> A.m
>>> A1.m
>>> A1a.m
>>> A1b.m
>>> A2.m
>>> B.m
>>> ...
>>> then concatenate these together, convert to postscript or pdf (linux:
>>> man enscript, windows: MS Word/Open office Writer), then print.
>>>
>>
>> Okay, perhaps an easier way is to find all the Matlab files under one
>> directory and print them out...
>>
>> (since when I develop programs, I put them all under local directory...)
>>
>> How to do that?
>
> on linux there exists the very useful program enscript. it also does code
> highlighting (however, i do not know in the case of matlab) and very nice
> things, such as borders and headings, multicolumn, ...
>
>
>
> michael
How about Matlab and on Windows XP?
Thanks
|
|
0
|
|
|
|
Reply
|
housing2006 (283)
|
4/23/2007 4:12:55 AM
|
|
Mike wrote:
> "Michael Wild" <themiwi.REMOVE.THIS@student.ethz.ch> wrote in message
> news:462ba0a3$1@news1.ethz.ch...
>> Mike wrote:
>>> "Ben" <jbenjam@gmail.com> wrote in message
>>> news:1177234602.385073.230950@n59g2000hsh.googlegroups.com...
>>>>> Currently for hundreds of such programs, I have to open each program
>>>>> one by
>>>>> one and then click to print each one by one... very time consuming...
>>>> Remember, these are simple text files. You don't have to open them
>>>> using the matlab editor. Use any editors you like.
>>>>
>>>> If you're in linux, you can simply concatenate them together using the
>>>> 'cat' command. If you're not in linux, I suggest learning the Perl
>>>> language (even if you are in linux, I suggest this). Perl can help
>>>> you deal with multiple text files in intelligent ways. It's not easy
>>>> to learn though, but the initial time invested is so much worth it in
>>>> the long run. I've probably saved hundreds of hours alone by using
>>>> perl for various tasks such as what you describe.
>>>>
>>>> In general a logical approach would be to order the filenames in order
>>>> of appearance within the code.
>>>> If A.m calls A1.m and A2.m, and A1.m calls A1a.m and A1b.m, you'd
>>>> have
>>>>
>>>> A.m
>>>> A1.m
>>>> A1a.m
>>>> A1b.m
>>>> A2.m
>>>> B.m
>>>> ...
>>>> then concatenate these together, convert to postscript or pdf (linux:
>>>> man enscript, windows: MS Word/Open office Writer), then print.
>>>>
>>> Okay, perhaps an easier way is to find all the Matlab files under one
>>> directory and print them out...
>>>
>>> (since when I develop programs, I put them all under local directory...)
>>>
>>> How to do that?
>> on linux there exists the very useful program enscript. it also does code
>> highlighting (however, i do not know in the case of matlab) and very nice
>> things, such as borders and headings, multicolumn, ...
>>
>>
>>
>> michael
>
> How about Matlab and on Windows XP?
>
> Thanks
>
>
I think enscript is available for cygwin. But on Windows you might also
opt for latex with the listings package. I know that listings does
matlab pretty printing and highlighting. To write a small (matlab?)
program which fills in a latex template is quite easily achieved. I did
it once and it worked like a charm. To spice things up you might also
consider using the package fancyheader.
Michael
|
|
0
|
|
|
|
Reply
|
themiwi.REMOVE.THIS (862)
|
4/23/2007 6:23:54 AM
|
|
|
5 Replies
78 Views
(page loaded in 0.134 seconds)
Similiar Articles: request for code - comp.soft-sys.matlabis there a way to print the Matlab .m source code file with all subroutines? 5 19 housing2006 (282) SeDuMi optimization tool bax - comp.soft-sys.matlabis there a way to print the Matlab .m source code file with all subroutines? 5 14 housing2006 (282) Accessing dynamic java classpath in Java classes - comp.soft-sys ...... am using Java within a Matlab .m file. Consider the following code ... MyGUI() available to the Matlab script. There is code ... The way MATLAB integrates with java is ... find/replace line of code (with carriage return) - comp.soft-sys ...I have a large m-file in which I need to find 1 line of code ... Yes, the code I've posted is Matlab code, which can run in an M ... without any code. If there a way to ... Difference between passing a number and a variable to a subroutine ...of the source code distribution ... an array by value to subroutines? > > Cheers, Ralph > There is no Fortran way ... There is no way to get all of the "features" of ... ODBC connection problem with matlab and windows 7 - comp.soft-sys ...... through your code to ... command to print a list of ODBC databases in an ODBC.INI file. ... ODBC data source over command line? - comp.soft-sys.matlab ... is there a way to ... Running multiple programs at once - comp.soft-sys.matlab ...> I wasn't sure if there was a way I ... ready for you to print. Possibly there ... There is no documented Matlab method that would even allow Matlab code to "volunteer ... Help needed: read 3-dimensional array from a MAT-file in Fortran ...... data(m,n,p) where m,n,p are positive integers, is written to a MAT-file in Matlab. ... All the subroutines have *.f90 format ... is there any parallel fortran code for matrix ... how to transpose large matrix? - comp.unix.shellIn the same way, dd can seek to arbitrary positions in the file, so (just ... sep = " "; } print "\n"; } close(M); (all error ... not checked the tail(1) source code ... Allow Printing and Assembly on encrypted PDF - comp.text.pdf ...Is there a way to combine two PDFs but still ... The following is the code that I use to ... after printing - comp.soft-sys.matlab ... If it is run, then "File->Print" is ... MATLAB Functions -- Basic Features - TheCAT - Web Services Overview... way you program. In the end this shift will help you write better MATLAB code. Creating function m ... There can exactly be one MATLAB function per m-file. ... print ... request for code - comp.soft-sys.matlab | Computer Groupis there a way to print the Matlab .m source code file with all subroutines? 5 19 housing2006 (282) 7/28/2012 5:28:46 AM
|