parsing error with missing commas?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

parsing error with missing commas?

jbsfhg
I have to port an entire toolbox from matlab to octave and run into
trouble with a parsing error:
syntax error
when I ussued a command with a cell array whose elements where separated
simply by spaces, which is quite common in matlab and also works with
octave 3 in many cases.
I attach the command as my email here cannot produce the brackets for
cell arrays, just {}

Thanks

--
Jörg Bretschneider

Fraunhofer-Institut für Integrierte Schaltungen
Institutsteil Entwurfsautomatisierung
Zeunerstr. 38,
01069 Dresden,
Germany

Tel. ++49(0)351/4640-749
Fax: ++49(0)351/4640-703
[hidden email]
www.eas.iis.fraunhofer.de



    BG_obj = vtkobj('vectors',{'bfeld' 'float' bgrid});
    bgrid = vtkobj('POINT_DATA',{grid_obj BG_obj});
    BHobj = vtkobj('array',{'bh' nh np 'float' b});
    BHobj = vtkobj('field',{'halldata' 1 BHobj});  
    BHobj = vtkobj('POINT_DATA',{space_obj BHobj});
    BHobj = vtkobj('FIELD_DATA',{space_obj BHobj});    
    bobj = vtkobj('vectors',{['bfeld' num2str(ipxc)] 'float' bpxc(:,:,ipxc)});
    SBobj = vtkobj('point_data',{SBobj bobj});    
    SBobj = vtkobj('point_data',{SBobj bcentral});
works all fine,
but this one creates a parsing error:

Syntax error

    BHobj.halldata.uh = vtkobj('array',{'uh' nh np 'float' uh});
                                                  ^

???

Note that the same command earlier with another variable name 'bh' did not produce
an error.

I didn't find any rules in the docs regarding the use of the comma as a separator.
Maybe there's an answer, but I didn't come across it....


_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

parsing error with missing commas?

John W. Eaton
Administrator
On 16-Jan-2009, Jörg Bretschneider wrote:

| I have to port an entire toolbox from matlab to octave and run into
| trouble with a parsing error:
| syntax error
| when I ussued a command with a cell array whose elements where separated
| simply by spaces, which is quite common in matlab and also works with
| octave 3 in many cases.
| I attach the command as my email here cannot produce the brackets for
| cell arrays, just {}

I see no simple fix for this problem.

jwe

_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave