[scilab-Users] How to replace Matlab stairs function in Scilab
Mathieu Dubois
mathieu.dubois at limsi.fr
Wed Mar 11 21:33:54 CET 2009
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/ref/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