<p><br>
Unfortuantelly I have never used std_plotcurve so I cannot help you directly. I have nevertheless two suggestions:<br>
1. You could consider using patch - it's pretty straightforward and works nicely for sd shading. The way to use patch is usually to define vert =[x1, y1; x2, y2; x3, y3 ... ] coordination matrix for vertices of the object you want to draw (where each pair x1 -y1 represents x, y coordinates of a given vertex)  and then plot the patch by(this works correctly only for one 2d patch object): patch('Vertices', vert, 'Faces', 1:size(vert, 1), 'FaceColor', [r g b], 'EdgeColor', 'none');<br>

(only remember to plot the patch before your main line or order axis hildren aproprietly)</p>
<p>2. Just to be sure - check if all the input vectors (cuealpha, cuesize) are actually of the same size. If they are -you can add a keyboard command just before the error to catch the variables of the function at that moment. This could give you a hint at what goes wrong within the function.<br>
</p>
<p>From: Pete Manza <<a href="mailto:pete.manza@gmail.com">pete.manza@gmail.com</a>> To: <a href="mailto:eeglablist@sccn.ucsd.edu">eeglablist@sccn.ucsd.edu</a> Cc: Date: Mon, 8 Apr 2013 13:02:44 -0400 Subject: [Eeglablist] Plotting standard error with std_plotcurve</p>

<p>Hi all,</p>
<p>I'm trying to plot a curveplot with the standard error shaded in around the lines. I got this to work once a while back with std_plotcurve but now I keep getting errors.</p>
<p>The help page for std_plotcurve says the plotstderr function only works under some data configurations, but I'm not sure what else to do.</p>
<p>I'm plotting three conditions (cuealpha11, cuealpha13, cuealpha31) that have a 101x31 structure (31 subjects). The times for the x-axis are in a 101x1 structure.</p>
<p>When I run this command:</p>
<p>std_plotcurve(cuetimes, {cuealpha11; cuealpha13; cuealpha31}, 'plotconditions', 'together', 'plotstderr', 'on', 'figure', 'on');</p>
<p>I gut the following error message:</p>
<p>??? Error using ==> fill Vectors must be the same lengths.</p>
<p>Error in ==> fillcurves at 65 h = fill(allpointsx, allpointsy, color);</p>
<p>Error in ==> std_plotcurve at 390 hold on; chandle = fillcurves( allx, tmpdata(tmpi,:)-tmpstd(tmpi,:),</p>
<p>tmpdata(tmpi,:)+tmpstd(tmpi,:), tmpcol{tmpi}); hold on;</p>
<p>What data structure does this need? The plots for the curves come out just fine, but I can't get the standard error shading. Thanks very much, Pete Manza Stony Brook University</p>