| Subject: | Re: Step function |
|---|---|
| From: | "Predictor" |
| Date: | 30 Sep 2005 02:55:57 -0700 |
| Newsgroups: | comp.soft-sys.matlab |
Gigi wrote: > Hi, I'd like to plot a step function (Ex:y(x)=0 if x<0 and y(x)=1 > if x>=0). Can anybody help me? Try something like this: % Generate some abscissa data X = randn(100,1); % Calculate step function, using double() to change to double data type Y = double(X >= 0); % Display the result figure, plot(X,Y,'b.'), grid on -Will Dwinnell http://will.dwinnell.com |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: export eps color, wrong color exported, Benoit Valley |
|---|---|
| Next by Date: | Re: Error installer class during installation Matlab 7. Help me!!, will |
| Previous by Thread: | Re: Step function, Jérôme |
| Next by Thread: | Re: Step function, Nasser Abbasi |
| Indexes: | [Date] [Thread] [Top] [All Lists] |