I would like to generate a signal output from a random number generator such that:
– The numbers are plotted until the first set of zero values.
– Starting from the next non-zero value, I would like plot the data such that at the first non -zero value, I offset the output and the following values by the non-zero number.
The pseudo code that I would like to implement is as follows:
% Plot all values until first set of zeros from the random number generator
output = input;% from the next non zero number
offset = input;output= input-offset;
Best Answer