[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MATLAB / Octave compatability, spacing, parsing
From: |
Steve C. Thompson |
Subject: |
Re: MATLAB / Octave compatability, spacing, parsing |
Date: |
Thu, 27 Oct 2005 10:59:54 -0700 |
User-agent: |
Mutt/1.5.9i |
Hi all,
My earlier post was about the parsing compatibility between
Octave and MATLAB. I've learned some things regarding this,
and FYI:
MATLAB doesn't allow whitespace before the transpose
operator.
[0 1]'
works in MATLAB, but
[0 1] '
doesn't. Octave properly parses both cases.
MATLAB always requires `...'.
rand (1, ...
2)
and
rand (1,
2)
both work in Octave. MATLAB chokes on the later.
Also, something else. MATLAB doesn't support `printf'.
foo = 5;
printf('My result is: %d\n', foo)
works in Octave, but not MATLAB. If using MATLAB, the kludge
is to issue `fprintf' instead:
foo = 5;
fprintf('My result is: %d\n', foo)
I plan to be logging these kinds of things at
<http://zeidler.ucsd.edu/~sct/computer/octave_matlab.html>.
Thanks,
Steve
On 24 Oct 05 13:29PM, Steve C. Thompson wrote:
> Hello group,
>
> In my collaboration with MATLAB users, they've complained
> about some parsing issues. Specifically, spaces. For
> example, I write my programs like
>
> this = that (with, some, parms);
>
> but I think that MATLAB generally wants
>
> this = that(with, some, parms);
>
> Then,
>
> a = b ';
>
> works in Octave but MATLAB requires
>
> a = b';
>
> I don't have MATLAB installed so it is hard for me to verify
> these subtleties. I've unsuccessfully found anything on the
> internet. Do any of you know of a resource that could be
> helpful? Any general guidelines?
>
> Thanks,
> Steve
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------