To combine data of just one date but repeated 20 times in MATLAB, you can use the unique
function with the 'stable'
option. The 'stable'
option preserves the order of the input vector.
Here's an example:
Suppose you have a vector data
that contains the same date repeated 20 times:
main.m50 chars2 lines
To combine this vector into a single value, you can use the unique
function as follows:
main.m39 chars2 lines
The output will be:
main.m24 chars4 lines
This will combine all the repeated values into a single value of 1.
gistlibby LogSnag