MATLAB Answers

How to perform cumulative product on a discrete signal in Matlab

2 views (last 30 days)
Varun Baskar
Varun Baskar on 2 Jun 2020
Commented: Varun Baskar on 2 Jun 2020
I tried to perform cumulative product on a discrete signal. But it keeps throwing errors. Am not sure how to go about it.
Here's my code:
function [i_o,q_o] = Accumulate(I, Q)
cumprod = dsp.CumulativeProduct;
i_o = cumprod(I);
q_o = cumprod(Q);
Thanks

  3 Comments

Steven Lord
Steven Lord on 2 Jun 2020
What is the full and exact text of the error messages you receive when you run your code? Show us all the text displayed in red in the Command Window when you run your Accumulate function.
Varun Baskar
Varun Baskar on 2 Jun 2020
Hi Steven,
I get the followinge error:
Error using Accumulate (line 13)
Not enough input arguments.
Line 13 is this line: i_o = cumprod(I);

Sign in to comment.

Answers (0)