octave-maintainers
[Top][All Lists]
Advanced

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

RE: return type of surfc for MatlabR2008a or later


From: Hall, Benjamin
Subject: RE: return type of surfc for MatlabR2008a or later
Date: Fri, 29 Aug 2008 12:42:14 -0400

-----Original Message-----
From: David Bateman [mailto:address@hidden 
Sent: Friday, August 29, 2008 12:17 PM
To: octave maintainers mailing list
Subject: return type of surfc for MatlabR2008a or later

MatlabR2008a added a hold lot of additional group graphic objects like 
line, surface series, etc. Unfortunately, I only have access to 
MatlabR2007b at the moment and so don't know what exactly surfc 
returns.. Could someone out there with R2008a run

h = surfc(peaks())
a1 = get (h,'type')
a2 = get(h,'children')
a3 = cellfun(@(x) get(x,'type'), get(h,'children'),'UniformOutput', false)
save surfctest.mat a1 a2 a3

and send the output.

==============

>> h = surfc(peaks())

h =

  172.0016
  173.0011
  174.0011
  175.0011
  176.0011
  177.0011
  178.0011
  179.0011
  180.0011
  181.0011
  182.0011
  183.0011
  184.0011

>> a1 = get(h,'type')

a1 = 

    'surface'
    'patch'
    'patch'
    'patch'
    'patch'
    'patch'
    'patch'
    'patch'
    'patch'
    'patch'
    'patch'
    'patch'
    'patch'

>> a2 = get(h,'children')

a2 = 

    [0x1 double]
    [0x1 double]
    [0x1 double]
    [0x1 double]
    [0x1 double]
    [0x1 double]
    [0x1 double]
    [0x1 double]
    [0x1 double]
    [0x1 double]
    [0x1 double]
    [0x1 double]
    [0x1 double]

>> a3 = cellfun(@(x) get(x,'type'), get(h,'children','UniformOutput',false))
??? Error using ==> get
Too many input arguments.

>> a3 = cellfun(@(x) get(x,'type'), get(h,'children'),'UniformOutput',false)

a3 = 

    []
    []
    []
    []
    []
    []
    []
    []
    []
    []
    []
    []
    []

>> save surfctest.mat.file a1 a2 a3
>> 
>> version

ans =

7.6.0.324 (R2008a)

>> 

(I added the ".file" to the extension because my OS does not allow me to
copy and/or attach files with the apparently dangerous .mat extension)

Attachment: surfctest.mat.file
Description: Binary data


reply via email to

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