[scilab-Users] How to replace Matlab stairs function in Scilab

David Tschische d.tschische at cisc.at
Thu Mar 12 08:10:57 CET 2009


Thank you Mathieu, "plot2d2" seems to be the answer. 
At least it support most parameters of the Matlab pendent in some way.

Another way I just discovered is using "plot2d" in combination with setting
the polyline settings:

handle = get("hdl");
handle.children(1).polyline_style = 2;

Regards,

Dave


> -----Original Message-----
> From: Mathieu Dubois [mailto:mathieu.dubois at limsi.fr]
> Sent: Mittwoch, 11. März 2009 21:34
> To: users at lists.scilab.org
> Subject: Re: [scilab-Users] How to replace Matlab stairs function in
> Scilab
> 
> Hi David,
> 
> > I just started to use Scilab and I'm struggling a little bit as I
> have to
> > convert some of my scripts from Matlab to Scilab.
> >
> > Is there any equivalent to Matlab "stairs" function or any suitable
> way to
> > draw staircase like steps?
> >
> 
> If I understand correctly matlab's stairs function
> (http://www.math.carleton.ca/old/help/matlab/MathWorks_R13Doc/techdoc/r
> ef/stairs.html)
> you should use plot2d2.
> 
> Try:
> --> x = 0:.25:10;
> --> plot2d2(x,sin(x));
> 
> BTW I have found this very simply: type 'step' in the 'search' tab of
> scilab's help.
> 
> Technically speaking plot2d2 is just a plot2d with a special
> polyline_style (see help :).
> 
> > In particular, I would like to have something similar to:
> >
> > 	stairs(rec(:,2),rec(:,1),'DisplayName','TAG0
> > Receiver','Parent',axes1);
> >
> 
> I don't know exactly what these options are supposed to do (I don't
> have
> matlab) but you should be able to find out the right options to
> plot2d2.
> 
> Hope that helps (if it's still needed),
> Mathieu





More information about the users mailing list