To store the output of two iterations of a loop in MATLAB and find their difference in the next step, you can follow these steps:
main.m23 chars2 lines
main.m184 chars8 lines
main.m73 chars5 lines
Now, the difference
variable will contain the difference of the two matrices generated in the last two iterations of the loop.
Note: Make sure to replace the rand(3,3)
function with your own matrix generation code according to your requirements.
gistlibby LogSnag