From help-octave-request at bevo dot che dot wisc dot edu Mon Jan 24 04:36:16 2000 Subject: Re: subplot and stem in matlab work but not work in octave of Discrete-time Signals From: Josu Jugo To: "help-octave at bevo dot che dot wisc dot edu" Date: Mon, 24 Jan 2000 11:35:50 +0100 > Hi, The funcion stem is not implemented in octave (At list, I don't known), but the sentence: subplot(2,1,1); stem(n1,x1); title('Sequence in Example 2.2a') is quite equivalent to: title('Sequence in Example 2.2a'); subplot(2,1,1); plot(n1,x1,'^') (Observe the different order of title) josu > | Dear octave expert: > | > | I copy some simple program from book "Digital Siganl Processing, > | using Matlab V.4" author by Vinay K.Ingle John G. Proakis from PWS > | published at page 15, example 2.2, > | > | my octave2.0.14 complain subplot and stem not be defined by gnuplot > | and stem.m file, so it also still can draw but not discrete graph > rather > | a connected(although not smooth, segmented) graph, > | > | Do any one know how to justify it, or where is the source code, we > | need to modify or adding new feature? > | > | at matlab input > | >>n=-2:10; x=[1:7,6:-1:1]; > | >>[x11,n11]=sigshift(x,n,5); [x12,n12]=sigshift(x,n,-4); > | >>[x1,n1]=sigadd(2*x11,n11,-3*x12,n12); > | >>subplot(2,1,1); stem(n1,x1); title('Sequence in Example 2.2a') > | >>xlabel('n'); ylabel('x1(n)'); > | > | > | it should execute: > | x1(n) = 2x(n-5) -3x(n+4) > | > | where x(n)= {1,2,3,4,5,7,6,5,4,3,2,1} > | > | > | Hope to get your(any octave expert) help (fsshl at uaf dot edu)(Do octave > have > | any news group?)function [y,n] = sigadd(x1,n1,x2,n2) > | n=min(min(n1),min(n2)): max(max(n1), max(n2)); > | y1=zeros(1,length(n)); y2=y1; > | y1(find((n>=min(n1))&(n<=max(n1))==1))=x1; > | y2(find((n>=min(n2))&(n<=max(n2))==1))=x2; > | y=y1+y2; > | > | function [y,n] = sigshift(x,m,n0) > | n=m+n0; y=x; > | > > ----------------------------------------------------------------------- > Octave is freely available under the terms of the GNU GPL. > > Octave's home on the web: http://www.che.wisc.edu/octave/octave.html > How to fund new projects: http://www.che.wisc.edu/octave/funding.html > Subscription information: http://www.che.wisc.edu/octave/archive.html > ----------------------------------------------------------------------- ----------------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.che.wisc.edu/octave/octave.html How to fund new projects: http://www.che.wisc.edu/octave/funding.html Subscription information: http://www.che.wisc.edu/octave/archive.html -----------------------------------------------------------------------