Search code examples
matlabplotdifferential-equations

Matlab Plot Differential of 8 mean curves


I have one matrix with 8 instances of 1000 rounds with 1000 iterations in each one. Use a rand valuematrix=rand(8,1000,1000) but in my case its date of time in miliseconds (0,003).

I want plot the one differencial curve of this 8 instances, note that is needed obtained the mean with 1000 rounds. So this one curve could represent mean value between 8 indexes of matrix.


Solution

  • Plotting the mean of ALL rounds and ALL instances

    plot(mean(matrix(1:8,:),2));
    

    plot

    diff() determines a derivative across a dimension (point-to-point subtractions); it does not sound like that's the function you should be using.