If you are really using the table datatype (as the error message suggests), then you are not indexing it properly. A table has variables, and you can index those as you are trying to do. So, I imagine you would need something like
for i=2:20
k=time.time(i)-time.time(i-1);
dt(i-1)= k;
end
It is a bit confusing to use 'time' as the name of both a table and a variable within that table, though you can do that if you want.
Looking at your code, though, I wonder why you need to use the table datatype at all. Why not just have a vector for time and a vector for dt?
Best Answer