User:Snooferfloosh: Difference between revisions

From Octave
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 4: Line 4:
----
----
Creating cell arrays requires comma separation.  The following code generates a syntax error:
Creating cell arrays requires comma separation.  The following code generates a syntax error:
<nowiki>a = {'hi' 'there' 34;'doc' 'bye' {'now' 'harold'}}</nowiki>
<nowiki>a = {'hi' 'there' 34;'doc' 'bye' {'now' 'harold'}}</nowiki>
but changing it to:
but changing it to:
<nowiki>a = {'hi', 'there', 34;'doc', 'bye', {'now', 'harold'}}</nowiki>
<nowiki>a = {'hi', 'there', 34;'doc', 'bye', {'now', 'harold'}}</nowiki>
works.
works.

Latest revision as of 12:05, 2 January 2012

Front page for tips-n-tricks that I've found useful...



Creating cell arrays requires comma separation. The following code generates a syntax error:

a = {'hi' 'there' 34;'doc' 'bye' {'now' 'harold'}}

but changing it to:

a = {'hi', 'there', 34;'doc', 'bye', {'now', 'harold'}}

works.