Hi,
I am a new user of Octave with next to no experience in programming and I
would like to have some advice as I am trying to use the following Matlab
codes, which someone told me should work fine in Octave:
%generate 10000 gaussian random numbers
y=randn(10000,1);
% look at a histogram to see that they are in fact gaussian distributed
hist(y,100);
%plot the raw data trace;
plot (y)
generate a time series from 0 to 500 ms steping by 1 ms;
f=(1:500)/1000;
generate the alpha function
%0.003 = 3 ms;
tau=.003;
f1=exp(-f/.003).*f;
%plot the alpha function to make sure it looks like what you want
plot(f1)
now convolve the data set (y) with the alpha function (f1)
y1=conv(y,f1);
%open a new figure window
figure
%plot the new signal
plot(y1)
I have tried to run this several times but unfortunately I can't get passed
the command line number 7.
I have highlighted (in red) the parts of the code that seem to be causing
the problem. I understand for instance that that the '%' in line 5 is just
to attribute the value 3ms to the time scale but I guess there must be an
equivalent operator for % in Octave because this one clearly doesn't work. I
would greatly appreciate any help on this.
Thank you very much!