Dear Scialb users,

how to insert time based data into a pre-defined Matrix without using a
for-loop?

The data points are not equally spaced in time.


example:
// assuming DATA includes 5 data Points
// each dat Point consists of 4 variable
// first variable = time

//datafile could look like

Time, Var1, Var2, Var3
0, 0, 0, 1
10, 0, 3, 1
15, 30, 0, 1
18, 0, 45, 0
36, 57, 28, 0

Assume that a timestep of 1 second is wanted.

desired result should look like this:

M =
0 0 0 1
1 0 0 0
2 0 0 0
3 0 0 0.
...
10 0 3 1
...
15 30 0 1
...
18 0 45 0
...
36 57 28 0

so "M" is bigger than the original dataset.

Again, I think I could do this using for-loops.
This could be OK for small dataset, but maybe become slow for huge data
sets (> 100'000 data points).

Thanks,
Philipp




Thanks,
Philipp





-- 
In Kanada is' ka' na' da. Sonst wär' Kanada Jemanda.

There we have the salad.
_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to