reshape/resize and array extension

June 7, 2012
1:16 p.m.
Hi everyone, I am making a program to realize some "live" data analysis. I progressively take the data, and write them in a file as a single column. If i take 2D data, this would give: data= X Y Z 0 0 1 1 0 2 2 0 3 0 1 1 1 1 2 2 1 3 0 2 1 1 2 1 2 2 1 To plot these data, i need first to reshape the Z column as a 2D array: z=data(:,2) z.resize(len(x),len(y)) The issue is that in most of the case, are the data is built live, the last line of the 2D array is almost never completed. To solve that issue i complete it with 'nan' My code is then z=append(z,zeros(len(x)*len(y)-len(z))*nan) z.resize((len(y),len(x)) Is there a simpler/faster way to do that completing-reshaping step ?
4642
Age (days ago)
4642
Last active (days ago)
0 comments
1 participants
participants (1)
-
Pierre Barthelemy