return type of surfc for MatlabR2008a or later
Ben Abbott
bpabbott at mac.com
Mon Sep 1 10:55:29 CDT 2008
On Sep 1, 2008, at 11:29 AM, David Bateman wrote:
> Ben Abbott wrote:
>>
>> On Sep 1, 2008, at 10:42 AM, David Bateman wrote:
>>
>>> Ben Abbott wrote:
>>>>
>>>>
>>>> I get the same result as Ben Hall did with 2008a.
>>>
>>> Then MatlabR2008a is buggy wrt surfc and their new linkdata
>>> function. Why am I not surprised :-)
>>>
>>
>> For kicks I downloaded the 2008b beta. The result is below. If you
>> want it I can provide the mat-file, but it appears to give the same
>> result as 2008a.
>>
>> >> 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
>>
> For kicks try instead
>
> [x,y,z] = peaks();
> h = surfc(x,y,z,'ZDataSource','z');
> for i = 1 : 10
> pause 1;
> z = 2 * z;
> refreshdata;
> end
??? Error using ==> pause
Unknown command option.
but the code below works
[x,y,z] = peaks();
h = surfc(x,y,z,'ZDataSource','z');
for i = 1 : 10
pause (1);
z = 2 * z;
refreshdata;
end
The "peak" peaks at about 10k ;-)
> suspect that will fail, while
>
> [x,y,z] = peaks();
> h = surf(x,y,z,'ZDataSource','z');
> for i = 1 : 10
> pause 1;
> z = 2 * z;
> refreshdata;
> end
Both surfc and surf work using pause(1).
Ben
More information about the Octave-maintainers
mailing list