help-octave
[Top][All Lists]
Advanced

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

Re: multi-line string in octave, Matlab code does not run in octave


From: Markus Bergholz
Subject: Re: multi-line string in octave, Matlab code does not run in octave
Date: Thu, 9 Jul 2015 21:56:29 +0200



On Thu, Jul 9, 2015 at 7:57 PM, Nasser M. Abbasi <address@hidden> wrote:
I am trying to run some code I wrote in Matlab under Octave. This code runs ok in Matlab:

---------------------
myString=['\n'...
'\\section{short summary table}\n'];
----------------------

But Octave gives syntax error

-----------------------
octave
GNU Octave, version 3.8.1

octave:1> t.m
parse error near line 2 of file /home/me/data/t.m

  syntax error
'\\section{short summary table}\n'];
     ^
--------------------



>> myString=['\n' ...
'\\section{short summary table}\n'];
>>



simply add a whitespace between end of string and the three dots





 
and
-------------------------
cat t.m
myString=['\n'...
'\\section{short summary table}\n'];
---------------------

Does not octave support long string continuation using ... as
with Matlab? and if so, what would the syntax be?

thanks,
--Nasser

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



--
icq: 167498924
XMPP|Jabber: address@hidden

reply via email to

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