Prev: Remove plot dead space in weekly plot
Next: PMSG
From: GradStu on 10 Aug 2010 08:39 If I have a complex number i.e. a = 10-i*5 when I execute stem(a), it plots only the imaginary part! Is this what stem should do? Thanks.
From: us on 10 Aug 2010 09:09 "GradStu " <LinuxFan(a)mail.com> wrote in message <i3rh98$3a6$1(a)fred.mathworks.com>... > If I have a complex number i.e. a = 10-i*5 > when I execute stem(a), it plots only the imaginary part! Is this what stem should do? > > Thanks. yes... but it is badly documented/coded... here's what happens v=[ 10-5i 15+4i ]; stem(v); %{ - STEM sees ONE arg... - STEM calls XYCHK, which splits V into the abs part(s) -> X the imag part(s) -> Y - BUT, because it only sees ONE arg - the X axis is simply enumerated... - hence, STEM plots the imag part(s) from 1:N %} % a workaround stem(real(v),imag(v)); set(gca,'xlim',[0,20],'ylim',[-10,10]); you might consider writing to TMW's doc department about this issue... us
From: GradStu on 10 Aug 2010 09:21 "us " <us(a)neurol.unizh.ch> wrote in message <i3rj1g$p1q$1(a)fred.mathworks.com>... > "GradStu " <LinuxFan(a)mail.com> wrote in message <i3rh98$3a6$1(a)fred.mathworks.com>... > > If I have a complex number i.e. a = 10-i*5 > > when I execute stem(a), it plots only the imaginary part! Is this what stem should do? > > > > Thanks. > > yes... but it is badly documented/coded... > here's what happens > > v=[ > 10-5i > 15+4i > ]; > stem(v); > %{ > - STEM sees ONE arg... > - STEM calls XYCHK, which splits V into > the abs part(s) -> X > the imag part(s) -> Y > - BUT, because it only sees ONE arg - the X axis is simply enumerated... > - hence, STEM plots the imag part(s) from 1:N > %} > % a workaround > stem(real(v),imag(v)); > set(gca,'xlim',[0,20],'ylim',[-10,10]); > > you might consider writing to TMW's doc department about this issue... > > us Thanks for your quick reply. I have to figure another way to do what I want to do. Yes, I will write to them.
From: us on 10 Aug 2010 09:30 "GradStu " > Thanks for your quick reply. I have to figure another way to do what I want to do. ok, what do you want to do(?)... us
From: GradStu on 10 Aug 2010 09:55
"us " <us(a)neurol.unizh.ch> wrote in message <i3rk9d$eii$1(a)fred.mathworks.com>... > "GradStu " > > Thanks for your quick reply. I have to figure another way to do what I want to do. > > ok, what do you want to do(?)... > > us I want to see the output of a convolution whose coefficient are complex? Any ideas? Thanks, |