Signals: Convolution - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: Signals: Convolution (/thread-5950.html) |
Signals: Convolution - toshk - 03-29-2016 01:04 AM Extended convolution code found on this forum. StatisticVar1 BAR plots for digital convolution (ask HP to give us stem plot). Can not plot zeros with Bar plot. Change from BAR plot to LINE plot if you want to see the zeros in the plot. this code will do piece-wise functions convolution; (LINE plot) [attachment=5329] RE: Signals: Convolution - toshk - 03-29-2016 01:23 AM lets do some convolution now (digital). square brackets [] digital signal representation NOT accepted. [attachment=3299] conv({1,2,3,4,5},{10,9,,8,7,6,5,4,3,2,1}) [attachment=3298] conv({1,2,3,4,0,0,0,0},{1,0,1,0,1,0,0,0}) [attachment=3300] syntax for Piecewise function {} only!!!! CAS x only {func1, range1, func2, range2,......} {-x+2,x<1,2,1<=x<5,.5x+1,5>=x} conv({-x+2,x<1,2,1<=x<5,.5x+1,5>=x},{1,0,1,0,1,0,0,0}) [attachment=3301] {0,x<-1,6*x+6,-1<=x<2,18,2<=x<7,0,7<=x} conv({-x+2,x<1,2,1<=x<5,.5x+1,5>=x},{0,x<-1,6*x+6,-1<=x<2,18,2<=x<7,0,7<=x}) RE: Signals: Convolution - cperrinekc - 04-10-2017 10:57 PM (03-29-2016 01:04 AM)toshk Wrote: Extended convolution code found on this forum. StatisticVar1 RE: Signals: Convolution - cperrinekc - 04-10-2017 10:59 PM I have been trying to add this code to my HP prime calculator, but i keep getting an error at the line where you have SAMP (v1,v2). Any ideas on how to fix this or what may be going wrong? RE: Signals: Convolution - toshk - 04-11-2017 07:19 AM (04-10-2017 10:59 PM)cperrinekc Wrote: I have been trying to add this code to my HP prime calculator, but i keep getting an error at the line where you have SAMP (v1,v2). Any ideas on how to fix this or what may be going wrong?Line 2: just after #pragma mode( separator(., integer(h32) ) instead of SAMP() try SAMP(v1,v2) |