In Matlab I can assign values inside arrays as follows.
a = [];
a(end+1, 1:2) = [1,2];
a(end,3:4) = [3,4];
a(end+1, 1:2) = [5,6];
a(end,3:4) = [7,8];
and so on. But in Python I can use the append command to append an array to the existing array. e.g.
a = []
a.append([1,2,3,4])
a.append([5,6,7,8])
My problem is I should assign the first two values at some point and the next two values in some other point as shown in my Matlab code. How can I do that?
a=[[1,2,3,4]], while it seems from the matlab code that you wanta=[[1,2],[3,4]]a(end+1, ...)you extendaby one more row; you're not assigning the values to the columns.