I have a for loop (j= 1:years) in which matrix A changes per j. Matrix A is a matrix containing birthdates in column 8. Each row represents a person. Per year the total number of persons decreases, so every j+1, the rows in matrix A reduces.
I want to generate a new matrix B, representing the age of each person w.r.t. t= today. So matrix B should be of length(A), though this changes over j.
The output I want to get is a matrix B ,including all ages per j, so j columns.
Can anyone help me with this? I tried several codes, but it's not working...