# Help with fill() compatibility Classic List Threaded 4 messages Reply | Threaded
Open this post in threaded view
|

## Help with fill() compatibility

 Could someone run the following code under Matlab and report the result? -- Code -- t = (1/16:1/8:1)'*2*pi; x = cos(t); y = sin(t); x2 = [x+0.5, x+1.0]; y2 = [y+0.5, y+1.0]; h = fill (x,y,'b',x2,y2,'g'); numel (h) -- End Code -- The return value should be either 2 or 3 depending on whether Matlab creates one patch object per dataset (x and x2) or one patch per polygon (one column in x and two columns in x2). Thanks, Rik
Reply | Threaded
Open this post in threaded view
|

## Re: Help with fill() compatibility

 On Fri, Oct 28, 2016 at 11:08 AM, Rik wrote:Could someone run the following code under Matlab and report the result? -- Code -- t = (1/16:1/8:1)'*2*pi; x = cos(t); y = sin(t); x2 = [x+0.5, x+1.0]; y2 = [y+0.5, y+1.0]; h = fill (x,y,'b',x2,y2,'g'); numel (h) -- End Code -- The return value should be either 2 or 3 depending on whether Matlab creates one patch object per dataset (x and x2) or one patch per polygon (one column in x and two columns in x2). Thanks, Rik Matlab 2016aans = 3Figure attached. graph.png (12K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

## Re: Help with fill() compatibility

 In reply to this post by Rik-4 On 10/28/2016 04:08 PM, Rik wrote: > Could someone run the following code under Matlab and report the result? > > -- Code -- > t = (1/16:1/8:1)'*2*pi; > x = cos(t); > y = sin(t); > x2 = [x+0.5, x+1.0]; > y2 = [y+0.5, y+1.0]; > > h = fill (x,y,'b',x2,y2,'g'); > numel (h) > -- End Code -- > > The return value should be either 2 or 3 depending on whether Matlab > creates one patch object per dataset (x and x2) or one patch per polygon > (one column in x and two columns in x2). > > Thanks, > Rik Rik,  >> version ans = 9.0.0.341360 (R2016a)  >> t = (1/16:1/8:1)'*2*pi;  >> x = cos(t);  >> y = sin(t);  >> x2 = [x+0.5, x+1.0];  >> y2 = [y+0.5, y+1.0];  >>  >> h = fill (x,y,'b',x2,y2,'g'); Warning: MATLAB has disabled some advanced graphics rendering features by switching to software OpenGL. For more information, click here.  >> numel (h) ans =       3  >>
Reply | Threaded
Open this post in threaded view
|

## Re: Help with fill() compatibility

 In reply to this post by Rik-4 On 10/28/2016 11:08 AM, Rik wrote: ```Could someone run the following code under Matlab and report the result? -- Code -- t = (1/16:1/8:1)'*2*pi; x = cos(t); y = sin(t); x2 = [x+0.5, x+1.0]; y2 = [y+0.5, y+1.0]; h = fill (x,y,'b',x2,y2,'g'); numel (h) -- End Code -- The return value should be either 2 or 3 depending on whether Matlab creates one patch object per dataset (x and x2) or one patch per polygon (one column in x and two columns in x2). ``` Matlab 8.6.0.267246 (R2015b) puts out      ans = 3