From: CyberFrog on
Nobody Important <Dr.Xenon1(a)gmail.com> wrote in message <fk3v1s$5vk$1(a)aioe.org>...
> Alessandro Zivelonghi wrote:
> > Hi,
> >
> > I would like to have this function that already works in
> > Matlab under Linux:
> >
> > ! cat A.txt B.txt > AB.rad
> >
> > also under Matlab for windows.
> >
> > It is clear I cannot use the unix "cat" function..
> > any suggestion?
> >
> > Many Thanks, Alex
>
> I haven't actually tried it, but maybe you can download the cygwin suite
> (search for "cygwin") which includes a cat program. Then put the cygwin
> directory into your $path.
>
> Note, though, that it's quite easy to concatenate matrices in matlab if
> that's what you're trying to do. The expression C = [A B] horizontally
> concatenates matrices A and B. The expression C = [A; B] vertically
> concatenates them.

Hi all,

Extending this subject the !type command works for me but do you know how I can included a variable to the path of these files i.e. ideally i would like to do something like this:

!type path_1 text_1.txt > new_text_file.txt

!type path_2 text_2.txt >> new_text_file.txt

Obviously this does not work so what is the format of this command?

Thanks

CF
From: Steven Lord on

"CyberFrog" <domlee55(a)hotmail.com> wrote in message
news:hvae8b$sfk$1(a)fred.mathworks.com...
> Nobody Important <Dr.Xenon1(a)gmail.com> wrote in message
> <fk3v1s$5vk$1(a)aioe.org>...
>> Alessandro Zivelonghi wrote:

*snip*

> Extending this subject the !type command works for me but do you know how
> I can included a variable to the path of these files i.e. ideally i would
> like to do something like this:
>
> !type path_1 text_1.txt > new_text_file.txt
>
> !type path_2 text_2.txt >> new_text_file.txt
>
> Obviously this does not work so what is the format of this command?

You cannot do this with the bang operator (!). You will need to use the
DOS, UNIX, or SYSTEM functions to do this. Construct the command you want
to execute as a string and call one of these functions with the string as
input.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com